client.storage. Uploaded files are served from a public CDN — no extra configuration required.
upload
Upload a file to storage.
Returns (
UploadResponse)
Store the
path alongside the url in your database. You need it to delete the file.Presigned URLs (Direct Client Uploads)
To allow frontend users to upload files directly without passing them through your server, use the presigned URL flow.1. requestUploadUrl (Server)
Generates a temporary upload URL. Requires your secret key.2. uploadToPresignedUrl (Client)
A static helper to push the file to the generated URL from the frontend.3. confirmUpload (Server)
Confirms the upload is complete and registers it in your storage quota.deleteFile
Delete a previously uploaded file by its storage path.Limits
Uploads that exceed 10 MB are rejected with a
StorageError. Projects connected to external (bring-your-own) storage are not subject to the 10 MB per-file limit.