Storage
Upload files from any SDK. Per-bucket retention, signed URLs, cascade-on-user-delete.
Upload images, documents, and other assets from any SDK with one call. Each file is stored against the signed-in user and surfaced via a CDN URL. Buckets are configured server-side with retention policies; assets are automatically removed when the owning user is deleted.
The client SDKs expose two shapes: a one-call upload({ bucket, file }) flow, and a two-phase presign + commit flow for when you want to upload through your own server or apply pre-upload validation.
Quick start
Operations
One-call upload (upload)
Available on platforms where the SDK can directly hold the file body (Web, React Native, Swift). Encapsulates the full presign → PUT → commit flow. Use this when the customer is uploading directly from their device.
Two-phase: presign + commit
Use when the upload must flow through your own server (validation, virus scanning, content rewriting) or when the SDK doesn't expose a one-call form.
Patterns
Per-user avatars
Buckets aren't user-scoped on the server, but every asset's user_id is stamped from the session. The CDN URL is public; if you want privacy-by-design, point clients at the asset id and gate URL issuance through a server function.
Retention
Pass retentionDays at upload to override the bucket's default. Assets pass their retention deadline are removed by a background sweeper.
Cascade on user delete
When a user is deleted (via the admin API), every asset they own across every bucket is queued for purge. No additional work needed in your app.
Limits
- Max upload size: up to 100 MB per single PUT.
- Supported MIME types: any. The server records what you declare; it doesn't transcode or validate content.
- CDN edge cache: signed-URL responses cache at the CDN for ~5 minutes by default; pass
cache: falsein headers on thecommitif you need freshness. - Buckets are pre-created: defined via the CLI (
amba storage create-bucket avatars --public) or the admin API before the client can upload. - Per-asset metadata: only the SDK-supplied fields (
bucket,filename,mimeType,sizeBytes,retentionDays) are first-class. For custom metadata, attach it to a collection row referencingasset_id.
Reference
- Client API — media — presign + commit endpoints.
- CLI:
amba storage— bucket creation + policy management. - Auth feature — prerequisite.
- Per-platform quickstarts: Web, Node, iOS, Android, Flutter, Unity.