Create a Supabase Storage bucket, choose public or private, add upload policies, and wire an upload button in your app.
Set up Supabase Storage so users can upload profile photos
How it works
- Create a bucket: A bucket is a folder for files. Vovy opens Storage in Supabase, clicks New bucket, and names it for what goes inside, like avatars.
- Choose public or private: A card explains: public buckets give anyone a link, fine for profile photos. Private ones need signed links, best for invoices or IDs.
- Set size and file type limits: Vovy sets a max file size and allowed types like image/png and image/jpeg, so nobody uploads a 2 GB video to your avatars bucket.
- Add upload policies: Uploads are blocked until you add policies. Vovy writes ones that let each user upload only into their own folder.
- Wire the upload button: Vovy asks your editor to add an upload button that saves to the bucket, then tests it with a real image and shows the file in Supabase.
What you provide
- A Supabase project
- What kind of files users upload
What you get
- A storage bucket with limits
- Policies that keep files private per user
- A working upload button
- A tested upload
FAQ
Why do uploads fail with new row violates row-level security policy?
Storage uses the same RLS as tables. Without an insert policy on storage objects, every upload is blocked.
How much storage do I get free?
The Free plan includes 1 GB of file storage. Pro includes 100 GB, with more billed by usage.
Can I resize images?
Supabase has image transformations on paid plans, which resize on the fly. On Free, resize in the browser before uploading.
Related tasks
All tasks