Prompt
How do I keep user attachments in storage that app servers can all read?
Latest observation
Oct 12, 2026
OpenAI APIWeb search: off
Use shared, durable storage instead of keeping attachments on a single app server’s local disk.
Good options
- Object storage: S3, Azure Blob Storage, Google Cloud Storage, MinIO
- Best for user uploads/attachments
- Scales well
- Easy for all app servers to read/write via API
- Shared network file storage: NFS, EFS, Azure Files, Filestore
- Works if your app expects filesystem paths
- Simpler to adapt existing code, but less ideal than object storage for most new apps
Recommended approach
- Upload attachment to shared storage
- Store only metadata in your database
- file name
- storage key/path
- content type
- size
- owner/user id
- Serve/download via app or signed URL
- For private files, generate short-lived signed URLs
- For public files, serve through CDN/object storage directly
Why not local disk?
- App servers may be stateless and replaced anytime
- Load balancers can send requests to any server
- Local files won’t be available on other nodes
- Harder to back up and scale
Common pattern
uploads/goes to S3/EFS- DB stores
attachment_id -> storage_key - App servers fetch the file from shared storage when needed
Quick rule of thumb
- If you want best default: use object storage
- If you need a filesystem interface: use network file share
If you want, I can suggest an architecture for your specific stack (e.g. Django, Rails, Node, .NET, Kubernetes, AWS/Azure/GCP).