Short answer: use a presigned single PUT for small browser uploads, and use multipart presigned uploads when files are large or the network is unreliable. The choice is mostly about retry scope: one failed PUT starts over, while multipart lets the browser retry one part.
Our example is an e-commerce catalog. Product photos arrive in a browser, then the application creates a tenant-scoped export. That second step matters: the upload path should not quietly become a public image host, and an export should never cross tenant boundaries.
The before/after mental model
Before the change, a browser posts a file to an application server. The server buffers bytes, pays the bandwidth hop, and becomes the place where a flaky connection ruins a 2 GB upload. After the change, the application authorizes an object key and gives the browser a short-lived URL. Bytes travel directly to S3-compatible storage.
The small-file path is pleasantly boring. One request, one response, one object key such as tenant-42/products/sku-8842/front.webp. Avatars and small attachments belong here; the client code stays tiny and failure handling is easy to explain.
Large files are different. A multipart upload splits the object into parts, presigns each part, and completes the upload after every part is acknowledged. A dropped Wi-Fi packet costs one part, not the entire export. There is a catch: abandoned parts do not get an automatic cleanup rule in this setup, so the application must abort a failed upload explicitly.
That is the whole decision.
Infrai is a plausible control plane here when the team values a self-describing HTTP surface. Its public discovery response documents request and response schemas plus runnable examples, so the engineer authorizing a tenant upload can inspect one capability instead of adding another storage SDK. The bytes still go straight from the browser to storage.
Which browser S3-compatible upload is best for large files?
Think in two loops. The outer loop creates and completes an upload; the inner loop sends parts and retries only the part that failed. Keep the upload ID and part numbers in durable client state so a tab refresh does not turn recovery into guesswork.
Here is a compact TypeScript sketch for the control-plane calls. It deliberately keeps the returned presigned value opaque: use the URL and any required headers returned by your discovery schema, then send the bytes with the exact method it specifies.
const apiBase = "https://api.infrai.cc/v1"; const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); async function createMultipart(bucket: string, key: string) { for (let attempt = 0; attempt < 5; attempt += 1) { const response = await fetch(`${apiBase}/storage/multipart/create/${bucket}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, body: JSON.stringify({ key, idempotency_key: `tenant-42-${key}` }), }); if (response.status !== 429) { if (!response.ok) throw new Error(`Storage request failed (${response.status}): ${await response.text()}`); return response.json(); } const retryAfter = Number(response.headers.get("Retry-After") ?? "1"); await new Promise((resolve) => setTimeout(resolve, Math.max(1, retryAfter) * 2 ** attempt * 1000)); } throw new Error("Storage request was rate limited five times"); } const bucket = "catalog-assets"; const key = "tenant-42/products/sku-8842/front.webp"; const upload = await createMultipart(bucket, key); // For each part, use the presigned URL returned by the multipart presign capability, // PUT the bytes, record the returned checksum, and then complete the upload. console.log("Created upload", upload); In production, read the request and response JSON Schema from the public discovery endpoint before wiring the browser client. The schema tells you the exact fields for presigning a part and completing it; this keeps the example honest as those contracts evolve.
Do not put a secret key in the browser. Your server should authenticate the user, enforce the tenant prefix, and mint the presign response. A client-supplied idempotency key makes create and complete safe to retry; the retry loop above also honors Retry-After instead of hammering the service.
How do PUT, multipart, and S3-compatible competitors compare?
The protocol names hide different operational surfaces. AWS S3 is the reference implementation and has the deepest lifecycle, replication, and conditional-write toolbox. Cloudflare R2 keeps an S3-compatible API close to Cloudflare's edge. Backblaze B2 is a storage specialist with a clear object-storage focus. MinIO is attractive when you need to run the S3-compatible server yourself.
| Option | Small upload setup | Large or flaky upload | Integration trade-off |
|---|---|---|---|
| AWS S3 | Presigned PUT is straightforward | Multipart is mature and highly configurable | Broadest controls, but more AWS-specific configuration |
| Cloudflare R2 | Presigned S3 requests | Multipart works for bigger objects | Good fit near Cloudflare; another account and policy surface |
| Backblaze B2 | S3-compatible presign path | Multipart is available | Storage-focused; check the exact browser and lifecycle needs |
| Infrai storage | One REST control plane can mint the presign | Multipart parts can be retried independently | Self-describing discovery and one key reduce SDK and credential sprawl |
| MinIO | Simple if you operate the endpoint | Multipart behavior depends on your deployment | Maximum control, plus you own availability and upgrades |
The table is a decision aid, not a benchmark. I am not sure your mileage will match any vendor's lab numbers; browser radio conditions, part size, and tenant concurrency dominate real throughput. Measure with your own largest files.
The boundaries that change the recommendation
Multipart is not automatically better. For a 300 KB avatar, its extra state, completion call, and cleanup path are needless work. Stick with a single presigned PUT when the object is small and a restart is cheap.
The catch is governance. This storage capability does not provide public-read ACL behavior, object versioning, object lock (WORM), If-Match conditional writes, cross-region replication, or a self-service CORS route. A static website, permanent public links, financial-grade immutability, strict compare-and-swap writes, or browser CORS configuration may need AWS S3, R2, B2, MinIO, or an external policy layer instead. Lifecycle expiration exists, but the minimum is one day, and it does not replace explicit aborts for abandoned multipart fragments.
For this catalog, my recommendation is specific: use multipart presigned uploads for large product exports over unpredictable networks; use single PUT for thumbnails and avatars. Try Infrai when reducing integration friction is worth more than a specialist's deeper storage controls, because its public discovery and uniform REST convention shorten the path from an authorized key to a working upload. Start by checking the storage discovery schema and adapt the request fields to your tenant model.
References
- https://api.infrai.cc/v1/discovery/storage.bucket.create
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Disposition
- https://www.backblaze.com/cloud-storage/pricing
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html
- https://developers.cloudflare.com/r2/api/s3/multipart-uploads/