File Storage

SDK

const f = await app.storage.upload(fileInput.files[0]);        // { id, name, url, size, mime, public }
img.src = f.url;                                            // public file URL
await app.storage.upload(blob, { name: "receipt.png", public: false });   // auth-only download
const files = await app.storage.list();                     // your files
await app.storage.delete(f.id);

REST

POST /v1/{pid}/files/upload      multipart/form-data: file=<binary>, public=1|0
GET  /v1/{pid}/files/{fileId}    -> binary (public, or Bearer token for private)
GET  /v1/{pid}/files             -> list (own files; all with secret key)
DELETE /v1/{pid}/files/{fileId}  -> owner or secret key

Allowed: images (jpg, png, gif, webp, svg), pdf, txt/csv/json, zip, mp3/mp4, docx/xlsx. Max size per plan (Free 5 MB). Storage counts against plan MB. Uploads require a signed-in user (or secret key).


Was this page helpful? Tell us. · Download SDK