Platform
File storage
Uploads go straight from the browser to the bucket through a presigned URL bound to the declared size and type, then the server checks the object before marking it ready.
What you get
- AWS S3, Cloudflare R2 and MinIO support
- Type and size rules per upload purpose
- A stable /api/files/[id] URL that checks access
- Avatars in settings
- Cleanup of abandoned uploads
Turn it on
- S3_BUCKET, S3_REGION, S3_ENDPOINT and the access keys
- pnpm storage:setup creates the bucket
Where it lives
lib/storage.ts