MODULE 02LESSON 04 · 08:12

File Storage

Upload avatars, documents, and any file your app needs.

SYSTEM_PLAYBACK_ACTIVEVideo placeholder

Storage lets your app accept file uploads — profile pictures, PDFs, generated images, anything. Files live in buckets, and each bucket has policies that control who can read and write.

/Public vs. private buckets

  • 01Public bucket: Files served over a CDN with a plain URL. Great for avatars and marketing images.
  • 02Private bucket: Requires a signed URL that expires. Use for user documents, receipts, or anything sensitive.
Sensible defaults

Lovable creates the right bucket type based on your prompt. "Let users upload profile pictures" makes a public bucket; "let users upload their tax returns" makes a private one.