Uploads & SDK
@cubster/assets is a typed, framework-agnostic client — zero React in the core. A client is created with createCubsterClient() and exposes four namespaces plus a set of pure URL builders.
| Namespace | Methods |
|---|---|
| apiKeys | create, list, revoke |
| workspaces | list, create |
| uploads | upload, createGrant, uploadWithGrant |
| assets | list, get, update, delete |
| URL builders | imageUrl, fileUrl, rawImageUrl, assetUrl, imageCascadePath, imageSrcSet, assetSrcSet, assetStorageKey |
Direct uploads (server, with a key), plus a grant flow for third-party browser uploads.
List (with type/search/tag filters), get, update, or delete assets already uploaded.
Session-only (a key can't mint other keys). The full secret is only ever returned once, on create.
List or create workspaces you own — see the Workspaces concept page for the full management surface (rename, delete) exposed over REST.
No client needed — these mirror the API's serve-URL cascade exactly. Presets: thumb, avatar,
hero,
small,
medium,
large.
SVGs and generic files always serve as forced downloads from /f/:key.
Every non-2xx response throws a typed CubsterError carrying the HTTP status and the API's { error } message.
- Max file size: 25 MB
- Per-workspace storage cap: 1 GB
- Image types: png, jpeg, webp, gif, avif, svg+xml
- File types: pdf, text/plain, csv, markdown, json, zip