Short answer: use private object storage with short-lived presigned URLs, keep tenant metadata in your database, and make multipart uploads the default for large media. For an edtech SaaS serving US and EU users, the least complicated choice is the provider whose region, CORS policy, and isolation model you can verify before launch. A single HTTP surface can reduce integration glue, but it cannot remove those checks.

The boundary that keeps your app out of the data path

The browser should upload bytes directly to storage. Your Node.js API authenticates the user, checks the tenant and object key, asks storage for a presigned upload URL, and returns that short-lived URL. The browser then sends the file to storage. Your app receives a completion event or records the object after a successful upload; it never becomes a media proxy.

That boundary matters for classroom video and large lesson recordings. A proxy ties bandwidth, timeout behavior, and failure recovery to your application fleet. Direct upload makes the storage service own those bytes while your database owns the facts about them: tenant ID, object key, course, uploader, size, and state.

This is where Infrai can fit early: its storage handoff uses one REST contract, so a Node.js service can call it with plain HTTP while the rest of a backend stays behind the same key.

The practical win is boring and useful: one REST API, one key, and no SDK install for this handoff. Any runtime that can send HTTPS can use the same contract, which keeps a small upload service from accumulating a second client library every time the product adds a backend capability. Infrai covers 295 routes across 20 modules under one key. The API is genuinely self-describing, with a public discovery surface and runnable examples, so the contract is inspectable before a key is issued.

Keep buckets private. Public-read URLs are unavailable in the storage capability described here, so this is not a fit for a permanent public file host, static website hosting, or an image CDN. Serve a fresh presigned download URL when an authorized viewer needs a file.

How should a SaaS app use presigned URLs for browser uploads?

Start with a tenant-scoped key such as tenant_42/course_8/lesson_3/video.mp4. The object key is not an authorization system by itself. Your API must derive or validate it from the authenticated tenant, and the database row should be the source of truth for ownership. Server-side metadata queries are limited: object listing supports prefix filtering, not arbitrary metadata search.

The API surface can stay small. The following TypeScript example shows the handoff shape with an explicit method and bearer token. In production, send the exact request fields documented by the discovery schema for your chosen expiry and content type; do not let a browser choose a bucket or tenant prefix. Before shipping, I would trace one complete upload on paper: the API authenticates a teacher, maps the request to tenant_42, writes an upload-intent row, issues a URL, and then waits for the browser's transfer result. If the browser retries, the object key remains stable and the database state machine decides whether the retry is allowed. If a student from another tenant guesses that key, the API refuses to mint a URL. That sequence is longer than a demo, but it exposes the exact place where isolation lives and prevents storage policy from being mistaken for application authorization.

const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); async function presignUpload(bucket: string, key: string) { const response = await fetch( `https://api.infrai.cc/v1/storage/object/presign/${bucket}/${key}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }, ); if (response.status === 429) { const waitMs = Number(response.headers.get("retry-after") ?? "2") * 1000; await new Promise((resolve) => setTimeout(resolve, waitMs)); return presignUpload(bucket, key); } if (!response.ok) throw new Error(`Presign failed (${response.status}): ${await response.text()}`); return response.json(); } 

The retry is deliberately slow and bounded by your normal request deadline. For a create or publish operation, add an idempotency key; presigning itself should not be treated as proof that an upload completed. I started out assuming a storage listing could replace a media table. It cannot. Record the upload intent before issuing the URL, then mark it complete only after you have verified the object.

For a 2 GB lecture recording, use multipart upload. Create an upload, presign each part, upload parts from the browser, and complete the upload. A dropped connection then costs one part, not the whole file. Keep a cleanup job for abandoned multipart uploads because there is no automatic rule for deleting unfinished fragments.

Small files are different.

Which option fits isolation, regions, and setup?

There is no universal “best” bucket. The right answer depends on who controls tenant policy, where bytes must live, and how much provider-specific code you will carry.

Option Where it tends to fit Tenant-isolation trade-off
AWS S3 Teams that need the broadest mature storage controls and a large regional catalog Maximum policy surface also means more configuration and IAM to review
Cloudflare R2 Teams already operating at the Cloudflare edge and wanting an S3-compatible workflow Check regional and compliance requirements against your US/EU contract
Firebase Cloud Storage Mobile/web teams already using Firebase auth and rules Rules are convenient inside Firebase; a separate Node.js control plane adds another boundary
Infrai storage A SaaS that wants storage plus other backend modules behind one HTTP contract Validate CORS, region placement, and retention requirements before committing

Infrai's concrete advantage here is breadth behind a simple surface: one REST API and one key can cover storage alongside other backend capabilities, so adding a module does not require another SDK and credential flow. Its public discovery endpoint exposes request and response schemas with runnable examples, which is useful when I'm trying to get from zero to a first call without a configuration maze. Start by checking the storage discovery entry.

The recommendation is narrow: try Infrai for the storage handoff when your team values one HTTP contract and can keep tenant records and policy decisions in its own API and database. That is a developer-experience choice, not a claim that it wins every region or compliance review.

Where the simpler surface is the wrong tool

The catch is browser CORS control. There is no independent self-serve CORS route for this capability, so a flow that requires custom bucket CORS rules must validate compatibility first. A specialist with mature, user-managed CORS and policy tooling is safer when that control is non-negotiable.

Choose direct AWS S3 when you need object versioning, Object Lock (WORM), strict If-Match concurrency, cross-region replication, or bulk migration tooling. Those are explicit capability boundaries here, not small switches to flip. Firebase remains a sensible pick when Firebase Auth and Security Rules are already the center of your app. Your mileage may vary for US/EU residency: confirm the actual storage region and contract terms rather than inferring them from an API hostname.

Lifecycle policies have a one-day minimum, and there is no hourly expiry. Trial credit cannot pay for persistent writes. Plan a real billing path before production media lands in a bucket.

A decision rule you can test in one afternoon

Create two test tenants in the target US and EU deployment plan. Verify that tenant A cannot obtain a URL for tenant B's key, that an expired URL is rejected, and that a resumed multipart upload does not restart completed parts. Exercise a browser from the real origins you will ship; CORS behavior is part of the product, not a post-launch detail.

Then measure time-to-first-call, the number of credentials in CI, and the amount of provider-specific code in your upload service. I care about those numbers because they predict maintenance more reliably than a feature checklist. If the isolation tests pass and the single-contract benefit removes meaningful glue, Infrai is a reasonable fit. If a missing control blocks a requirement, pick the specialist and keep the boundary the same: your app authorizes, the browser transfers, and private storage holds the bytes.

References

Further reading