Overview
Sublay’s storage system lets you upload files and images on behalf of authenticated users. Uploaded assets are stored in managed cloud storage and served through a proxy URL so direct storage credentials are never exposed to the client.Requires the
files-images bundle. File and image uploads are only available when the files-images bundle is installed on your project. See Bundles to add it.Upload Modes
Sublay provides two hooks for uploading assets:- Image upload — server-side processing with automatic variant generation (resizing, format conversion, EXIF stripping). Returns named variants for responsive display.
- File upload — generic upload for documents, videos, and other files. No server-side processing — the file is stored as-is and a proxy URL is returned.
Image Processing Modes
When uploading images, you choose a processing mode that defines how variants are generated:File Size Limits
Hooks
useUploadImage
Upload and process an image with automatic variant generation.
useUploadFile
Upload a generic file and receive a proxy URL.
API Reference
- Upload Image —
POST /:projectId/api/v7/storage/images - Upload File —
POST /:projectId/api/v7/storage - Fetch File —
GET /:projectId/api/v7/storage/:fileId - Delete File —
DELETE /:projectId/api/v7/storage/:fileId

