Q31: How would you design a file upload and download service?
Issue an authenticated upload session and use pre-signed object-storage URLs so large files can bypass application servers. Support multipart uploads, checksums, size/type limits, and resumability. After upload, verify the object and process it asynchronously for scanning, thumbnails, or transcoding. Serve downloads through a CDN or short-lived signed URLs, enforce authorization at issuance, and define lifecycle policies, quotas, and deletion behavior.
Key Takeaways
- Use object storage for large binary data and direct transfer where safe.
- Validate uploaded content and authorize every download path.