file-storage
Installation
SKILL.md
File Storage Engineering (S3 / Cloudflare R2)
Purpose
File storage is deceptively simple to get wrong. Storing uploads on the local filesystem breaks horizontally scaled deployments. Serving files through your API server adds latency and unnecessary load. Using the original user-supplied filename is a name collision and security vulnerability. This skill implements the production pattern: secure upload → cloud object storage → CDN delivery.
Storage Provider Decision
| Scenario | Choose |
|---|---|
| Already on AWS | S3 (native, IAM integration) |
| Want S3-compatible but cheaper egress | Cloudflare R2 (S3-compatible API, zero egress fees) |
| Video files / large media | S3 or R2 with multipart upload |
Both use the same boto3 client in Python.