
Uploading a 500 MB video or a 5 GB raw dataset through your web application backend is an architectural trap.
Every megabyte sent by the client enters your application server first, occupies heap memory or temporary disk space, and then gets re-transmitted over a second connection to object storage. When twenty users upload simultaneously, your app server runs out of file descriptors, worker threads stall, and cloud bandwidth bills double.
The solution is direct client-to-bucket multipart uploads. The browser slices files into 10 MB or 20 MB chunks and streams each chunk straight to the S3 bucket via presigned URLs. Your backend server never touches the raw payload—it only signs authorization tokens.
Server proxy vs direct browser multipart: measured impact
Here is what happens on a typical 4-core, 8 GB RAM application server ingesting 1,000 files of 500 MB each (500 GB total upload volume):
| Metric | Server-proxied upload | Direct S3 multipart (Uppy) | Difference / Benefit |
|---|---|---|---|
| Server transit bandwidth | 500 GB in + 500 GB out (1.0 TB) | 0 GB (only metadata API) | 100% elimination of transit bandwidth |
| App server RAM per active stream | 150 MB – 850 MB buffer | 4 MB (lightweight JSON token handler) | 99.5% reduction in worker memory footprint |
| Peak CPU usage during uploads | 78% – 94% (context switching & TLS) | 3% – 5% (HMAC SigV4 signing only) | Leaves app server available for API requests |
| Upload timeout risk | High (proxy gateway 60s/120s limit) | Zero (each chunk uploads in 2–5s) | Eliminates reverse proxy 504 Gateway Timeouts |
| Resilience to network drop | Restart entire 500 MB upload | Retry failed 10 MB chunk only | Resumable uploads across network blips |
| Max upload size support | 500 MB (practical proxy ceiling) | Up to 5 TB (S3 multipart limit) | Handles massive media and raw archives |
S3 bucket CORS configuration
Because the browser makes direct cross-origin HTTP requests to your S3 endpoint, you must configure CORS on the target bucket. Specifically, Uppy requires access to the <code>ETag</code> header returned by each uploaded part to assemble the final completion manifest:
Watch out: If ETag is not included in ExposeHeaders, the browser cannot read the part identifier from the response. Uppy will fail at the completion step with an empty part list error.
Backend signing endpoints in Python
Uppy's <code>@uppy/aws-s3-multipart</code> plugin expects four lightweight REST endpoints from your backend:
- POST /s3/multipart: Calls
CreateMultipartUpload, returninguploadIdandkey. - GET /s3/multipart/:uploadId/batch: Generates presigned PUT URLs for each chunk index.
- POST /s3/multipart/:uploadId/complete: Calls
CompleteMultipartUploadwith the assembled part list. - DELETE /s3/multipart/:uploadId: Calls
AbortMultipartUploadif the user cancels.
Here is a clean implementation using Python and FastAPI with boto3:
Frontend setup with Uppy
In the browser, initialize Uppy with the <code>@uppy/aws-s3-multipart</code> plugin. Set <code>partSize</code> to at least 10 MB (10,485,760 bytes) and enable automatic retry logic:
Cleaning up abandoned part uploads
When users close their browser tabs mid-upload, uploaded parts remain in the bucket indefinitely unless explicitly aborted. Although incomplete objects are invisible to normal file listings, storage providers bill for the stored chunk bytes until the upload is completed or aborted.
Always configure a bucket lifecycle rule to automatically abort incomplete multipart uploads after 3 to 7 days:
Object storage architecture on tport.space
<b>tport.space</b> provides an S3-compatible object storage API designed for scalable file ingestion with zero egress fees on downstream reads. Direct browser uploads with Uppy work seamlessly with standard SigV4 endpoints, allowing you to ingest terabytes of user data without proxy server bottlenecks.
Explore our related storage engineering guides:
- Calculate optimal chunk sizes for gigabyte payloads in Multipart uploads: which part size for 5 GB, 50 GB and 500 GB files (
/articles/multipart-part-size-5gb-50gb-500gb). - Track down and purge orphaned chunk storage in Abandoned multipart uploads: how to find them, what they cost and how to abort them (
/articles/abort-incomplete-multipart-uploads-s3-cost-script). - Protect single-file webhook drops with strict MIME and size caps in Securing webhook upload drops with S3 presigned PUT URLs (
/articles/securing-webhook-upload-drops-s3-presigned-put).
Build high-speed browser uploads directly to S3-compatible storage with zero egress fees.
Deploy on tport.space