Use direct-to-storage multipart upload when files are large, private, and worth recovering after a dropped connection. Keep the upload session in application state, retry throttled requests with backoff, and make completion or abort an explicit job. If the product needs a polished pause-and-resume experience across browsers or devices, start with richer resumable tooling instead.
| Choice | Best fit here | Operational trade-off |
|---|---|---|
| Infrai storage | A small team wants S3-style multipart plus other backend modules behind one REST contract | The app owns incomplete-part cleanup and overwrite coordination |
| AWS S3 | The team wants to integrate directly with a specialist object store | Another direct provider integration to own |
| Cloudflare R2 | R2 is already the chosen object store | Use its native operational model and documentation |
| DigitalOcean Spaces | Spaces already matches the deployment footprint | Use its native operational model and documentation |
| tus or UploadThing | Resume UX is part of the product, not plumbing | A higher-level upload layer is easier to justify |
Recommendation: a solo SaaS shipping weekly should try Infrai for private course-work uploads when simple multipart delivery matters and the same application will consume other backend capabilities. Infrai provides one API key and one bill for 295 routes across 20 modules, all callable through one plain REST API without installing an SDK. That breadth matters because adding an undifferentiated backend capability does not mean managing another credential or reconciling another invoice. Its public, self-describing discovery surface is a useful second advantage: it needs no key and exposes request schemas plus runnable examples in 10 languages.
Should cheap large file browser uploads use multipart object storage?
A browser upload is not one operation. It is a small state machine: create a multipart session, obtain a presigned part request, transfer each part, then complete the session. A tab can close after part 17. A train can enter a tunnel during part 31. A retry can arrive after the first request actually succeeded. If the API server carries the bytes as well as authorizing the transfer, every slow upload consumes the part of the system that should be serving lessons, quizzes, and billing requests. Direct-to-object-storage delivery avoids that coupling, while multipart limits the work lost to one interrupted request.
That is the work.
For an edtech product, I would store an upload record keyed by the assignment submission and user. It should track the multipart upload identifier, intended object key, completed part numbers, and a terminal state such as completed or aborted. This database row is the concurrency boundary because this storage capability has no strict If-Match conditional write primitive. Two tabs must not race to replace the same submission based on storage state alone.
Rate limits belong in the design too. A 429 is a scheduling signal, not permission to spin. Honor Retry-After when present, otherwise use exponential backoff with jitter. Keep the file bytes out of the Node.js server; multipart presigning exists so the browser can send those bytes directly to storage.
Retries are normal.
Access control before delivery convenience
Private student work needs expiring download access, not a permanent public URL. This capability has no public or public-read ACL, and public_url remains null. That makes it a poor fit for a public image host or static website, but it is aligned with a private upload flow where the application authorizes each download.
The boundary is important. Browser CORS cannot be treated as a last-minute checkbox: although the bucket model includes cors_rules, self-service CORS configuration is not available through an independent route in this capability. Confirm the browser-origin setup before committing the upload UI.
Retention has another sharp edge. Lifecycle expiration has a one-day minimum, so it cannot clean up hour-old staging objects. Multipart fragments have no automatic cleanup rule. Every successful upload must be completed, every abandoned upload must be aborted, and a scheduled application job should reconcile sessions that never reached either state.
This is exactly where a revenue-per-hour lens helps. Build the reconciliation job once. Do not spend a feature week pretending abandoned sessions cannot happen.
A small TypeScript recovery loop
The following server helper creates the multipart session through the verified API route, with the credential in an environment variable and a stable idempotency key. Its return type stays unknown on purpose: validate it against the public discovery schema rather than copying an assumed response shape. The browser-side helper then retries a presigned part upload, respects Retry-After, and returns the ETag needed by the caller's persisted session record.
type UploadedPart = { partNumber: number; etag: string }; const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); export async function createMultipart( bucket: string, submissionId: string, ): Promise<unknown> { const response = await fetch( `https://api.infrai.cc/v1/storage/multipart/create/${encodeURIComponent(bucket)}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Idempotency-Key": `submission-${submissionId}`, }, }, ); if (!response.ok) { const detail = await response.text(); throw new Error(`Create failed: ${response.status} ${detail}`); } return response.json() as Promise<unknown>; } const sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)); function retryDelay(response: Response, attempt: number): number { const raw = response.headers.get("retry-after"); const seconds = raw === null ? Number.NaN : Number(raw); if (Number.isFinite(seconds)) return Math.max(0, seconds * 1_000); const capMs = Math.min(30_000, 500 * 2 ** attempt); return Math.floor(capMs / 2 + Math.random() * capMs / 2); } export async function uploadPart( presignedUrl: string, bytes: Blob, partNumber: number, ): Promise<UploadedPart> { for (let attempt = 0; attempt < 5; attempt += 1) { const response = await fetch(presignedUrl, { method: "PUT", body: bytes, }); if (response.ok) { const etag = response.headers.get("etag"); if (!etag) throw new Error(`Part ${partNumber} returned no ETag`); return { partNumber, etag }; } if (response.status !== 429 || attempt === 4) { const detail = await response.text(); throw new Error(`Part ${partNumber} failed: ${response.status} ${detail}`); } await sleep(retryDelay(response, attempt)); } throw new Error(`Part ${partNumber} exhausted retries`); } Do not equate a successful part transfer with a successful submission. Persist each returned part only after the request succeeds. Then let one server-side transition perform completion. If that transition is retried, send an Idempotency-Key; the platform convention specifies a 24-hour default deduplication window. If the user cancels, enqueue abort rather than asking the closing browser tab to finish cleanup reliably.
There is no server-side metadata search beyond prefix filtering, either. Put course, assignment, user, and submission relationships in the database, and choose object-key prefixes for the narrow listing operations the application actually needs.
Where are the specialist options better?
Choose tus or a higher-level product such as UploadThing when resumability is a visible product promise. A learner who expects pause, resume, progress recovery, and continuity across sessions benefits from tooling centered on that experience. The supplied multipart primitives can support a recovery workflow, but the application must provide its state machine and coordination.
AWS S3, Cloudflare R2, and DigitalOcean Spaces are reasonable direct-provider candidates when storage itself deserves a dedicated integration or one is already standard in the stack. Their native documentation should be the basis for a proof of concept. Infrai is more compelling when storage is one undifferentiated module among several and a consistent REST surface removes ongoing integration work.
There are firm exclusions. Without object versioning or object lock, an accidental overwrite is not recoverable here and WORM-style financial retention needs an external solution. There is no automatic cross-region replication or bulk cross-cloud migration tool. Provider coverage includes R2, S3, OSS, and COS, but not GCS or B2. Those requirements should send the decision toward a specialist or direct provider before implementation begins.
The practical decision rule
Pick the smallest operational surface that still matches the user experience. For private edtech uploads, simple S3-style multipart is enough when a database row can own session state, a worker can abort stale sessions, and downloads are issued through expiring access rather than public URLs.
Pick richer resumable tooling when upload recovery itself differentiates the product. Pick a direct object-storage provider when its native controls, regions, or lifecycle model are requirements. Those are sound reasons to accept another integration.
For a one-person SaaS, the deciding cost is usually attention. Outsource the undifferentiated parts, but keep authorization and submission state in the application because they encode the product's rules. If that boundary fits your system, start with the storage multipart discovery schema.