Vibe Coder · Unit 12: Login and Data With Supabase · Lesson 5 of 6

File storage

Let people upload files such as images and PDFs, and make sure private files stay private.

Read the short notes and pictures.Do everything inside a blue frame.

Storing files

Databases hold structured facts. Files such as images and documents live in storage, grouped into buckets. The key decision is whether a bucket is public or private, and it is much easier to get right at the start.

A 3D scene of coloured blocks and cards. : Public bucket, Private bucket.
A bucket is public or private.

What to ask for

  1. A private bucket

    For anything a user uploads.

  2. Upload from the app

    With a size limit and allowed file types.

  3. Rules like your tables

    Each person can reach only their own files.

  4. Signed links

    Short-lived links to show a private file.

A 3D scene of coloured blocks and cards. Private files: the owner asks, a link that expires, the file.
Private files are opened with a link that expires.

What to test

Upload and view

As the owner.

The link in another browser

Signed out, after it expires.

A huge or wrong-type file

Is it refused?

ActivityBuild stepSign-in and saved data

Add an upload

If your product needs files, have Claude Code add a private bucket with an upload, a size limit and signed links. Test that a second account cannot open the first account’s file. If it does not need files, note why in "My build".

Done when

You used the same pattern on this site for lesson films.

Keep these

  • Files live in buckets.
  • Private by default.
  • Use expiring links for private files.