Prompt
I'm building a SaaS app that stores uploads and generated PDFs. What storage should I use?
Latest observation
Oct 12, 2026
OpenAI APIWeb search: off
For a SaaS app with uploaded files + generated PDFs, the usual best practice is:
Use object storage, not your database
Store the files in:
- Amazon S3 (most common)
- Google Cloud Storage
- Azure Blob Storage
- or an S3-compatible option like Cloudflare R2, Backblaze B2, DigitalOcean Spaces, etc.
Your app/database should store only:
- file metadata
- storage key/path
- owner/user reference
- size, MIME type, status, timestamps
- access permissions
Why object storage?
It’s a better fit because it gives you:
- cheap storage for lots of files
- durability and redundancy
- easy scaling
- private access control
- signed URLs for secure downloads/uploads
- lifecycle rules for cleanup/archival
Recommended setup
A typical pattern:
- User uploads file
- App sends it directly to object storage using a signed upload URL
- Save metadata in your DB
- When you generate a PDF, write it to object storage too
- Serve downloads using signed URLs or a CDN if public
If you need a simple default
Best general choice:
Amazon S3
- mature
- reliable
- widely supported
- easy integration with most frameworks
Best budget-friendly alternative:
Cloudflare R2
- often cheaper for egress-heavy workloads
- S3-compatible API
- good if you expect lots of downloads
If you’re already on a cloud:
- AWS app → S3
- GCP app → GCS
- Azure app → Blob Storage
What not to do
Avoid:
- storing files inside your SQL database as BLOBs unless files are tiny and infrequent
- storing files on your app server’s local disk if you run multiple instances or autoscale
Local disk breaks down quickly when you need:
- horizontal scaling
- deployments
- failover
- background PDF generation workers
A solid SaaS architecture
- DB: Postgres/MySQL for metadata
- Storage: S3/R2/GCS for files/PDFs
- Queue/worker: generate PDFs asynchronously if needed
- CDN: optional for public/static assets
- Signed URLs: for secure access
If you want, I can also recommend:
- the cheapest option,
- the best AWS setup,
- or a multi-tenant file storage design for your SaaS.