File storage
Cadrant uses Supabase Storage to manage your application's files: images, documents, attachments and all types of media. Storage is attached to your Supabase project and accessible via a simple API.
Features
- Upload and download files directly from your application.
- Support for all file types: images, PDFs, videos, documents, etc.
- Public or private URLs depending on bucket configuration.
- On-the-fly image transformations (resize, crop) via Supabase.
- Each bucket is created automatically by Cadrant in your Supabase project.
Configuration
- Describe the storage need in your prompt (e.g.: 'Users can upload a profile photo').
- Cadrant creates the necessary bucket and configures upload components in your interface.
- Choose between public access (files accessible without authentication) or private (requires a token).
- Configure access policies in Supabase to control who can read and write to the bucket.
Best practices
- Use public buckets for content images (logos, product photos) and private buckets for sensitive data (documents, attachments).
- Limit the size and type of uploaded files to prevent abuse.
- Configure RLS policies on storage for production-grade security.
- Consider client-side image compression before upload for better performance.
For production use, always verify your bucket access policies in the Supabase dashboard. By default, Cadrant configures basic access that should be refined for your specific use case.