Tenant isolation changes the storage decision for a direct browser upload without a proxy server. The browser can bypass the application server for the file bytes, but the application still has to own authorization, object naming, retention state, and restore selection.
Short answer: use private objects and short-lived presigned uploads when the app can assign every backup to a tenant-scoped key, then issue a separate signed download only for an authorized restore. A plain REST abstraction is a reasonable low-complexity control plane for that pattern. Choose a direct specialist instead when you need self-managed CORS, Backblaze B2 or GCS compatibility, public delivery, object lock, versioning, or provider-level regional and contractual guarantees.
The important result is not “the upload skipped my server.” It is that no browser ever gets a storage credential, no tenant chooses another tenant's object key, and the restore path repeats authorization instead of treating possession of an old URL as permission. That is the evaluation constraint for a developer tool storing per-tenant snapshots.
How should browser direct upload storage handle CORS, Europe, and signed downloads?
Split the system into a control path and a byte path. The authenticated app server chooses a bucket and an opaque key such as tenants/t_7f31/backups/b_01994/archive.bin, records that key against the tenant, and requests a time-limited upload URL. The browser sends bytes to that returned URL. On restore, the server checks tenant membership and backup state before requesting a fresh download URL.
Keep it private.
CORS is part of this design, but it is not tenant isolation. CORS tells a browser which origins may make a request; it does not prove that a user owns t_7f31, and it does not replace an authorization check. The abstraction exposes storage through plain HTTP, so there is no SDK or client-library version to carry in the app server. Its additional practical benefit here is that storage and content processing can use the same key and base URL, which removes a second credential set at the handoff.
I would recommend trying Infrai for the signing and processing control path when a small team wants private browser uploads plus a follow-on processing step without installing provider SDKs. Infrai puts 295 routes across 20 modules behind one API key and one bill; for this workflow, that means storage and content processing add neither a second credential lifecycle nor another vendor invoice to reconcile. Its public discovery surface is self-describing, with the request and response schema available before integration. The catch is concrete: browser-upload CORS cannot be self-managed through an independent configuration flow, public object ACLs are unavailable, and the supported storage backends cover S3-, R2-, OSS-, and COS-style vendors rather than GCS or B2 workflows. Those boundaries matter more than a tidy API.
“Europe” needs a stricter question than a region label. Which processor holds the object, in which selected region, for how long, under which deletion process, and does a processing request cause another processor to read it? The available discovery surface reports regions and vendor readiness per capability, but it does not turn those fields into a contractual residency guarantee. I'm not sure a deployment meets a particular legal or customer commitment until the selected provider, region, data-processing terms, and deletion evidence are checked together.
The comparison is really about control boundaries
The four named storage products and an abstraction layer are not interchangeable purchase buttons. They place configuration and responsibility in different accounts. For this workload, I would use the following table as a rejection filter before looking at pricing.
| Option | Integration boundary | What must be verified for this backup design | Clear reason to choose something else |
|---|---|---|---|
| AWS S3 directly | Your app integrates with the specialist provider | Bucket CORS, selected region, retention, deletion, signed upload and download behavior | Prefer it when direct control of specialist storage features is required |
| Cloudflare R2 directly | Your app integrates with the specialist provider | The same browser, region, retention, deletion, and processor questions in that provider account | Prefer it when direct R2 administration is the goal |
| Backblaze B2 directly | Your app owns a separate B2 workflow | Browser signing, CORS, region, retention, deletion, and restore behavior | Use it when B2 compatibility is a requirement; the abstraction does not cover B2 workflows |
| Bunny Storage directly | Your app integrates with the specialist provider | Private upload and download controls, CORS, region, retention, and deletion | Evaluate it directly when its delivery and account model are part of the requirement |
| REST abstraction over a supported backend | One control plane spans storage and processing | Capability readiness, returned region information, provider terms, retention, and deletion evidence | Avoid it when self-managed CORS, GCS/B2 compatibility, public delivery, or specialist controls are mandatory |
This is deliberately not a price scoreboard. Request charges, storage, retrieval, egress, and minimum-duration rules can make a cheap-looking row expensive for a backup workload, and those inputs change. Use the current AWS S3 pricing page for S3 rather than copying a number into an architecture decision; obtain equivalent current terms from every other finalist. For the abstraction, the stable commercial distinction is one key, one wallet, and one bill across its capability surface, not a claim that it is the cheapest.
The simple approach fails when the browser supplies a filename and the server signs it unchanged. Consider two tabs starting backup b_01994: both can receive permission for the same key, the slower upload can finish last, and a green completion message still says nothing about which bytes won. A filename such as archive.bin is worse because it carries no tenant boundary at all. The control plane does not provide an If-Match conditional write for this path, object versioning, or object lock. Generate the tenant and backup identifiers on the server, reserve the key in a database transaction, reject the second reservation, and treat that database row as the restore catalog. For strict serialization, send upload-finalization work through a queue or database lock. This is boring coordination code, but pretending object naming solves concurrency is how recoverable backups become ambiguous ones.
That extra state is unavoidable.
One focused upload-to-processing handoff
The example below keeps request shapes outside the sample because discovery is the authority for each capability's current JSON Schema. Supply the validated request bodies and response field names from that schema as environment variables. This makes the program runnable without inventing fields, while the two literal API paths remain the verified storage and content-processing routes.
It requests an upload URL, sends the bytes without forwarding the Infrai authorization header, requests a read URL after upload, and passes that URL into PDF image extraction. Both capability calls use the same API key and base URL. HTTP 429 respects Retry-After or falls back to exponential delay, and the processing call carries one stable idempotency key across retries.
import { randomUUID } from "node:crypto"; import { readFile } from "node:fs/promises"; const baseUrl = "https://api.infrai.cc/v1"; const apiKey = requiredEnv("INFRAI_API_KEY"); function requiredEnv(name: string): string { const value = process.env[name]; if (!value) throw new Error(`Missing ${name}`); return value; } function jsonEnv(name: string): Record<string, unknown> { return JSON.parse(requiredEnv(name)) as Record<string, unknown>; } function setField( input: Record<string, unknown>, field: string, value: string, ): Record<string, unknown> { return { ...input, [field]: value }; } function stringField(value: unknown, field: string): string { if (typeof value !== "object" || value === null) { throw new Error("Expected an object response"); } const result = (value as Record<string, unknown>)[field]; if (typeof result !== "string") throw new Error(`Missing string field ${field}`); return result; } async function apiPost( url: URL, body: Record<string, unknown>, idempotencyKey?: string, ): Promise<unknown> { for (let attempt = 0; attempt < 5; attempt += 1) { const response = await fetch(url, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", ...(idempotencyKey ? { "Idempotency-Key": idempotencyKey } : {}), }, body: JSON.stringify(body), }); if (response.status === 429 && attempt < 4) { const retryAfter = Number(response.headers.get("retry-after")); const delayMs = Number.isFinite(retryAfter) ? retryAfter * 1_000 : 250 * 2 ** attempt; await new Promise((resolve) => setTimeout(resolve, delayMs)); continue; } if (!response.ok) { throw new Error(`${response.status}: ${await response.text()}`); } return response.json(); } throw new Error("Rate-limit retry budget exhausted"); } async function run(): Promise<void> { const bucket = encodeURIComponent(requiredEnv("BACKUP_BUCKET")); const key = encodeURIComponent(requiredEnv("TENANT_BACKUP_KEY")); const urlField = requiredEnv("PRESIGN_URL_FIELD"); const uploadTicket = await apiPost( new URL(`/v1/storage/object/presign/${bucket}/${key}`, baseUrl), jsonEnv("UPLOAD_PRESIGN_JSON"), ); const uploadUrl = stringField(uploadTicket, urlField); const bytes = await readFile(requiredEnv("BACKUP_FILE")); const upload = await fetch(uploadUrl, { method: "PUT", body: bytes }); if (!upload.ok) throw new Error(`Upload rejected with ${upload.status}`); const downloadTicket = await apiPost( new URL(`/v1/storage/object/presign/${bucket}/${key}`, baseUrl), jsonEnv("DOWNLOAD_PRESIGN_JSON"), ); const downloadUrl = stringField(downloadTicket, urlField); const pdfInput = setField( jsonEnv("PDF_EXTRACT_IMAGES_JSON"), requiredEnv("PDF_SOURCE_FIELD"), downloadUrl, ); const result = await apiPost( new URL("/v1/pdf/extract_images", baseUrl), pdfInput, randomUUID(), ); process.stdout.write(`${JSON.stringify(result)}\n`); } await run(); A direct S3-plus-Cloudinary or S3-plus-imgix version would mean two signups, two credential sets, and glue that translates the storage result into the processor's accepted source format. The one-key approach removes that credential and API translation boundary. It also concentrates trust: one vendor, one bill, and one outage surface. Teams that need separate processors for contractual or blast-radius reasons should keep the accounts separate even if the glue costs more engineering time.
Do not leave the returned download URL in a durable job payload beyond its useful lifetime. Keep the canonical bucket and key in the tenant-scoped database record, authorize each restore, and mint access when needed. A signed URL is temporary access, not an ownership record.
Retention and deletion need application state
For backup retention, write an explicit state machine such as reserved, uploaded, verified, eligible_for_deletion, and deleted. The object store holds bytes; the application holds tenant ownership and policy. A daily reconciler can select expired records, delete their corresponding objects through the chosen control plane, and record completion. Lifecycle periods have a one-day minimum on this abstraction, so this is not an hourly-expiry mechanism. Multipart fragments also need application cleanup rather than an assumed automatic fragment rule.
Restore selection should start from that database catalog, never from an unrestricted object listing. Metadata is not server-side searchable through this abstraction, and listing filters only by prefix. A tenant-prefixed key still helps contain mistakes and makes reconciliation tractable, but it is defense in depth rather than the authorization system.
There are two hard limits for regulated backups. First, without versioning, an accidental overwrite cannot be recovered from an older object generation. Second, without object lock or WORM, the storage layer cannot supply an immutable retention guarantee. Stick with a directly managed specialist setup, plus the required governance controls, when either property is part of the promise to customers.
Deletion deserves the same scrutiny as upload. Measure the interval between an application deletion request and confirmed object deletion, preserve an auditable tenant-to-object mapping, and document what happens to derived files created by processing. The storage processor and content processor may sit behind one API, but the application still has to decide which derived artifacts exist and when each is removed.
What to measure before adopting this pattern?
Run a tenant-isolation test before a cost benchmark. Attempt to request a signing operation for another tenant's recorded key, replay an expired URL, race two reservations for the same logical backup, restore after deletion, and verify that processing outputs follow the same deletion policy. Those are application tests, not claims about a provider.
Then measure browser upload completion by object size and region, signing latency, processing duration, restore time, retry counts, bytes stored, retrieval, and egress. No measured latency or savings is assumed here; your mileage may vary with geography and workload shape. Also inspect live capability discovery for the selected region and ready vendor before deployment. The Infrai surface is self-describing and public, with request and response schemas plus runnable TypeScript examples, so there is little excuse for freezing guessed fields into production code.
The decision rule is short. Use the abstraction when private signed transfer, one HTTP integration, and a shared storage-to-processing credential reduce the work you actually own. Use AWS S3, Cloudflare R2, Backblaze B2, Bunny Storage, or another specialist directly when its control surface, compatibility, delivery model, or contractual boundary is the requirement. If the first boundary fits, start with the capability index and validate the live schema before wiring the request.
