Defining Storage
Describe what files you need to store:How It Works
- Client requests a signed upload URL
- Client uploads directly to storage (not through your API)
- Client saves the file reference to the entity
- Files are retrieved via signed URLs or CDN
Upload Flow
1. Request Upload URL
2. Upload File
3. Save Reference
Download Flow
Get Signed URL
File Restrictions
Configure allowed file types and sizes:- Content-type validation
- File size limits
- Optional virus scanning
Storage Configuration
Backdrift configures storage with security best practices:| Setting | Default |
|---|---|
| Encryption | Server-side (AES-256) |
| Versioning | Disabled |
| Public access | Blocked |
| CORS | Configured for your domain |
| Lifecycle | No automatic deletion |
Lifecycle Policies
Configure automatic cleanup:CDN (Optional)
For public files (like product images), enable CDN:- Global edge caching
- HTTPS
- Automatic compression
- Custom domain support
Image Processing
For images, you can request transformations:Multi-Tenant Storage
In multi-tenant mode, files are isolated by organization:Security
Signed URLs
Signed URLs
All uploads and downloads use time-limited signed URLs. Direct bucket access is blocked.
Encryption
Encryption
Files are encrypted at rest using AES-256 server-side encryption.
Virus Scanning
Virus Scanning
Optional: Scan uploads for malware before accepting.
Access Control
Access Control
File access follows the same authorization rules as your entities.
Example: Document Management
- S3 bucket with versioning enabled
- 30-day lifecycle policy for deleted objects
- Signed URLs for secure upload/download
- Content-type validation
Lovable Integration
Learn how to build frontends with file uploads in Lovable.
