Skip to content

File Uploads and Storage — S3, Supabase Storage, and Presigned URLs

Handle file uploads with S3, R2, and Supabase Storage — presigned URLs, image processing, size limits, and security considerations.

14 min readfile-uploads, s3, supabase-storage, presigned-urls, images

Every real product eventually needs file uploads. Profile photos, document attachments, product images, CSV imports, video uploads — the moment users need to get their files into your system, you need a storage strategy.

The naive approach — saving files to your server's filesystem — works in development but fails spectacularly in production. Servers are ephemeral, especially on platforms like Vercel. Your files disappear on the next deployment. You need cloud storage.

Let's build file uploads the right way.

Cloud Storage Options

AWS S3

The original and most widely used object storage. Everything else is either built on S3 or compatible with its API.

  • Virtually unlimited storage — Pay only for what you use
  • Fine-grained permissions — IAM policies control access
  • **

This lesson is part of the Guild Member curriculum. Plans start at $29/mo.