Prompt
I'm building an internal tool with shared documents, what file storage should I use?
Latest observation
It depends mostly on how your team uses the documents and whether you need collaboration, permissions, auditability, or scale. For an internal tool, the best default is usually:
Use an object storage service (like Amazon S3, Google Cloud Storage, or Azure Blob Storage) for the actual files, and store metadata/permissions in your database.
Good default architecture
- Files: object storage
- Metadata: Postgres/MySQL
- Access control: your app’s auth/authorization layer
- Upload/download: pre-signed URLs or backend-mediated access
- Versioning: enabled in object storage or handled in your app
This is usually the most flexible and scalable setup.
When to choose what
1) Object storage: best for most internal tools
Use this if you need:
- PDFs, images, spreadsheets, attachments, exports
- many users and growing storage
- secure access control
- easy backups and lifecycle management
Examples:
- AWS S3
- Google Cloud Storage
- Azure Blob Storage
- S3-compatible options like MinIO if self-hosted
Pros:
- cheap and scalable
- durable
- easy to integrate
- supports versioning, lifecycle rules, encryption
Cons:
- not a “document collaboration” system by itself
- you’ll need to build permissions/search/metadata
2) Shared drive / file server: good for simple team sharing
Use this if:
- you want something quickly accessible like a network drive
- files are edited manually by people
- you don’t need tight app integration
Examples:
- SMB/NFS file server
- Google Drive / SharePoint / OneDrive
Pros:
- easy for users
- familiar UI
Cons:
- harder to integrate with your app
- weaker control over metadata and workflows
- permission management can get messy
- not ideal for automation
3) Document management system: best for heavy compliance/workflows
Use this if you need:
- approval workflows
- retention policies
- legal/compliance audit trails
- OCR/full-text search
- check-in/check-out, version history, comments
Examples:
- SharePoint
- Box
- OpenText
- Alfresco
Pros:
- many document features built in
Cons:
- more complex
- may be overkill for an internal tool
- harder to customize deeply
4) Database storage: usually avoid for actual files
Storing binary files directly in the DB is usually only OK for:
- very small files
- very small scale
- prototypes
Pros:
- simple at first
Cons:
- bloats DB backups
- worse performance for large files
- harder to manage at scale
Recommended choice by scenario
- Simple internal app with uploads → S3/GCS/Azure Blob + DB metadata
- Internal app with collaborative editing → Google Drive / SharePoint / Box integration
- Compliance-heavy docs → document management system
- Prototype only → DB or local disk, but plan to migrate
A practical recommendation
If you’re building the app yourself, I’d suggest:
- Store files in S3-compatible object storage
- Keep document records in Postgres
- Use pre-signed URLs for upload/download
- Add versioning
- Add full-text search via OCR/indexing if needed later
Quick questions to narrow it down
If you want, I can recommend a specific storage choice if you tell me:
- Do users need to edit docs in place or just upload/download?
- Do you need folder-like sharing or per-document permissions?
- Any compliance requirements?
- Are you on AWS, GCP, Azure, or self-hosted?
- Roughly how many files / total storage size?
If you answer those, I can suggest the best setup and a simple architecture.