Logopicto

Uploading Assets

Make your app's bundled images resolvable when a recording is replayed on the web dashboard.

When your app draws a bundled image (Image.asset(...)), the recording captures a lightweight reference to it (its asset path) rather than the actual pixels — cheaper, and there's no need to re-upload the same app icon or avatar with every single recording. Replaying on the same device the recording came from works out of the box, since the app's own asset bundle is right there.

Replaying in the web dashboard is different — the browser has no access to your app's bundle. To make asset references resolve there too, upload your asset bundle to the backend once (per release, or whenever your assets change), using the upload_assets script that ships inside the picto package itself — no separate download or checkout needed.

Running the script#

From your Flutter project's root (the one whose pubspec.yaml declares the assets, and which already depends on picto):

dart run picto:upload_assets

That is the whole command. It signs you in and then lists your client apps to pick from, so nothing has to be looked up in the dashboard first.

FlagMeaning
--email, --password Your dashboard account. Omit either one and you'll be prompted for it, which keeps your password out of your shell history.
--client-app-id A client app to upload to. Repeat it to upload the same bundle to several. Omit it entirely and the script lists the client apps your account owns and lets you choose.
--on-duplicate What to do when an asset with that name already exists: ignore (default), override , or fail .
--project Path to the Flutter project to read assets from. Defaults to the current directory.
--endpoint Which backend to upload to. Defaults to picto.yaml 's endpoint if it declares one, then the hosted picto backend.

Authentication is your account's email and password, not an API key — the script needs to see every client app you own in order to offer you the list. picto.yaml is consulted only for --endpoint; it holds no credential this script uses.

The script reads the flutter.assets section of your pubspec.yaml — both individually-listed files and directory entries — and uploads each one, keyed by its exact declared path (e.g. assets/images/logo.png), which is the same key Image.asset references resolve against.

Limits#

Individual assets over 5MB are skipped with a warning rather than uploaded. The check happens on your machine, before the request, so an oversized file costs nothing but the message. Everything else in the bundle still uploads — one skipped file does not fail the run.

Re-running it#

Safe to re-run. By default (--on-duplicate ignore) an asset whose name already exists for that client app is reported as skipped and counted as success, so re-running after a release that changed nothing is a harmless no-op.

To actually replace an asset's image — a redesigned logo under the same path — re-run with:

dart run picto:upload_assets --on-duplicate override

which uploads the new bytes over the existing asset in place, keeping its name. Use --on-duplicate fail if you would rather a name collision stop the run than pass silently.

When to run it#

Run it once per release, or any time your bundled assets change — as part of your normal release checklist, alongside building the app itself. It has no runtime relationship to the recording SDK; it's a standalone maintenance step.