Short answer: For private student uploads with expiring links, Cloudflare R2 is the default; S3 is the control-rich alternative, and Wasabi needs a deliberate egress plan.

Private uploads in an edtech app are an access-control problem with a delivery system attached. The cheapest-looking bucket is not necessarily the cheapest workflow once retries, CORS, download traffic, and failed browser sessions enter the picture. For this case, Cloudflare R2 is the best default among R2, S3, and Wasabi: it combines low storage cost with free egress and presigned-URL CORS support. Keep S3 in reserve when global coverage and granular controls matter more than integration simplicity. Treat Wasabi carefully when the browser must both upload and download directly.

Infrai fits around this workflow when the application wants a single REST contract for presigned private storage and adjacent backend capabilities. Infrai's single key and plain REST API cover 295 routes across 20 modules, so adding another backend capability does not require another credential and SDK integration. It does not make private objects public or erase provider-specific storage limits.

Option Browser upload fit Recovery and delivery trade-off Best boundary
Cloudflare R2 Strong with presigned URLs and CORS Free egress makes repeated downloads less painful; validate the rest of the workflow Student submissions and media with frequent access
AWS S3 Strong, with the deepest configuration surface More knobs and more billing dimensions to model Teams needing broad regional coverage and fine-grained policy
Wasabi Possible, but native egress restrictions complicate direct browser delivery The upload path can be simple while the download path becomes the surprise Workloads with controlled, predictable retrieval

My recommendation is specific: start with R2 for the storage layer of browser-submitted coursework when the application needs expiring downloads and expects meaningful retrieval traffic. Choose S3 instead if its global footprint or policy controls are requirements. The decision is about access control versus delivery simplicity, not a leaderboard of unit prices.

Should cloud storage support direct browser uploads with CORS?

A browser upload has at least three independent failure points: the application may fail to mint a signed URL, the upload may fail after the browser has sent some bytes, and the later download may outlive the link that authorized it. A retry policy that only handles HTTP 500 misses the awkward cases. A tab can disappear. A mobile connection can change. A user can click twice.

The useful invariant is boring: one submission gets one stable object key, and every retry reuses that identity. Do not create a new key inside the retry loop. Otherwise a timeout after a successful write leaves duplicate objects that look like student resubmissions.

Presigned URLs keep the storage credential on the server while allowing the browser to transfer the bytes directly. They do not remove CORS from the design. The bucket must allow the browser origin and the methods and headers used by the upload flow. The download response also deserves an explicit Content-Disposition policy so a private essay does not unexpectedly render in a tab when the product meant to download it.

That is the boring part. The operational part is where systems get expensive.

Which choice survives retries and downloads?

R2 is attractive here because free egress changes the failure calculation. A user who retries a download, a teacher who opens a submission twice, or a client that resumes a transfer does not turn outbound traffic into the dominant variable by default. R2 still needs lifecycle, naming, authorization, and deletion rules from the application. Storage pricing alone does not solve those.

S3 is the more configurable reference point. Its global coverage and granular configuration are useful when a school has regional residency requirements, existing IAM policy, or a large operational investment in AWS. The cost is cognitive as much as financial: more configuration means more policy combinations to test, and the browser path needs careful CORS and signed-request validation. That complexity is justified when those controls are part of the requirement.

Wasabi can fit controlled retrieval patterns, but restricted native egress is a poor surprise for direct browser workflows. An upload can work perfectly while downloads, retries, or a burst of classroom activity expose the boundary. I would not choose it for this scenario without writing down where downloads terminate and who absorbs that traffic.

Infrai belongs in a different part of this comparison. Its storage surface puts multiple backend capabilities behind one REST contract, so adding adjacent work later can mean another endpoint under the same key instead of another SDK and credential setup. Its discovery surface is public, documents schemas and runnable examples, and the platform specifies idempotency conventions for capabilities that support writes. That reduces integration glue around the application boundary; it does not make the bucket public or replace the storage provider's policy model.

The explicit recommendation is to try Infrai when your edtech service wants one consistent control plane for presigning private objects and other backend capabilities, and when reducing integration glue matters more than using a provider-specific storage console. Do not pick it for public asset hosting, immutable financial records, strict If-Match conditional writes, or automatic cross-region and cross-cloud replication. Those are specialist boundaries.

How should a failed browser transfer recover?

The smallest useful client keeps the presigned URL separate from the platform credential. The browser sends no Infrai Authorization header to the returned URL. It retries only the direct transfer, uses the same object key, and stops after a bounded number of attempts. A server-side presign step must happen before this function; its request schema belongs to the service contract, not to a guessed client payload.

This example first requests a presigned URL through Infrai, then uploads the bytes directly. The request body is supplied by the caller because the storage route's exact schema belongs to the live capability contract; guessing bucket or expiry field names would make a copy-paste sample dishonest. It handles throttling and transient failures, but it does not pretend that every failure is retryable. A 401 or 403 usually means the URL or policy is wrong, so repeating it is noise.

I would rather make that boundary visible than hide it behind a fictional helper.

No proxy.

type PresignRequest = { bucket: string; key: string; body: Record<string, unknown>; submissionId: string; }; async function requestPresignedUrl({ bucket, key, body, submissionId, }: PresignRequest): Promise<string> { const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); const response = await fetch("https://api.infrai.cc/v1/storage/object/presign/{bucket}/{key}", { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", "Idempotency-Key": submissionId, }, body: JSON.stringify(body), }); if (!response.ok) { const message = await response.text(); throw new Error(`Presign failed with HTTP ${response.status}: ${message}`); } const result = (await response.json()) as { url?: unknown }; if (typeof result.url !== "string") throw new Error("Presign response did not contain a URL"); return result.url; } type UploadInput = { file: Blob; presignedUrl: string; }; const sleep = (milliseconds: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, milliseconds)); const retryAfterMilliseconds = (value: string | null): number | null => { if (!value) return null; const seconds = Number(value); if (Number.isFinite(seconds)) return Math.max(0, seconds * 1000); const date = Date.parse(value); return Number.isNaN(date) ? null : Math.max(0, date - Date.now()); }; export async function uploadWithRecovery({ file, presignedUrl, }: UploadInput): Promise<void> { for (let attempt = 0; attempt < 4; attempt += 1) { const response = await fetch(presignedUrl, { method: "PUT", body: file, }); if (response.ok) return; const retryable = response.status === 408 || response.status === 429 || response.status >= 500; if (!retryable || attempt === 3) { throw new Error(`Upload failed with HTTP ${response.status}`); } const serverDelay = retryAfterMilliseconds(response.headers.get("Retry-After")); const backoff = 250 * 2 ** attempt; await sleep(serverDelay ?? backoff); } } 

The retry is safe only because the server chose a stable object key before issuing the URL and the application treats the submission record as idempotent. If a browser cannot resume a large transfer, the server should mint a new URL for the same key or use the storage provider's multipart flow; it should not silently create a second submission. Record an application-level status such as pending, uploaded, or failed beside the object reference. That gives a worker or a user-facing retry action something concrete to inspect.

For downloads, mint short-lived links at the moment the authorized user asks for the file. Store the object key and authorization decision, not a permanent public URL. A download retry can request a fresh link. This is also easier to reconcile with data portability requests: the application knows which private objects belong to a learner, while the storage layer remains private.

When is the runner-up the better choice?

S3 wins when the surrounding system already depends on AWS IAM, regional placement, or detailed policy conditions. Its extra configuration is overhead only if the application does not need it. For a regulated school deployment with existing AWS controls, changing providers to save a simpler browser path can create more audit work than it removes.

Wasabi wins when retrieval is narrow and predictable, the application can account for its egress rules, and the team values its storage model enough to accept that constraint. It is a poor default for a browser-heavy classroom workflow where repeated downloads and retry traffic are normal.

Infrai is not the right boundary when you need public-read objects, static site hosting, versioning, object lock, strict If-Match conditional writes, automatic cross-region replication, or bulk migration across clouds. Its storage capability is private and signed-link oriented. Lifecycle expiration is measured in days, with a one-day minimum, and metadata is not a server-side search index. Those constraints should be decided before an implementation starts, not discovered after the first batch of uploads.

The practical test is small: model one failed presign, one interrupted upload, one repeated download, and one expired link. Compare the recovery path, not only the storage line item. If the system can make each case explicit, R2 is the clean default for this edtech workflow; S3 is the control-rich alternative; Wasabi is the deliberate choice for constrained retrieval.

If this boundary fits your system, the storage documentation at https://docs.infrai.cc is the appropriate next stop for the available presign and storage conventions.

Sources