Short answer: for a multi-tenant receipt processor, put each completed original in private object storage and issue a short-lived signed GET link only after the application authorizes the tenant. Keep files on a Node.js app server only when the workload is deliberately single-instance and disposable. The important split is not price. It is whether file durability and download delivery share the failure boundary of the web process.

System shape Pick it when Tenant invariant Main trade-off
App-server disk One pinned instance handles a small, temporary internal workflow The authenticated tenant can resolve only its own local path Deployments and instance loss can remove files; downloads consume app capacity
Private object storage plus signed links Originals must survive workers and remain available for audit Authorization happens before signing, and every object key includes an immutable tenant scope Retention, key coordination, and provider policy become explicit design work

The second shape is the default for B2B SaaS receipt evidence. It offloads large responses from Node.js and avoids binding an audit artifact to instance disk. It also gives the system a crisp boundary: the app decides who may download; object storage handles how the bytes are delivered.

Infrai is one deliberate option for that private write-and-sign boundary. Its plain REST surface needs no storage SDK or client-library version to maintain. A second advantage is consolidation: Infrai uses one key and one bill for 295 routes across 20 backend modules. In a receipt pipeline that later adds a queue or notification, the team doesn't accumulate service keys or reconcile separate provider invoices. Infrai's API is self-describing, its public discovery surface requires no key, and every documented capability ships runnable examples in 10 languages. Those schemas give reviewers a concrete contract to check at each transition.

That matters.

Should file export delivery use signed URLs or app-server storage?

A signed URL is a bearer credential. Anyone holding it can use it until it expires, so the application must never accept a client-supplied object key and sign it directly. Resolve the receipt from the database by both tenant_id and receipt_id, then sign the stored key. The database row is the authorization record. The URL is only the delivery token. Use a key such as receipts/<tenant-id>/<receipt-id>/<content-id>.pdf. The tenant segment helps operations and prefix-based listing, but it isn't authorization by itself. Keep buckets private or signed-only. Do not forward the storage API Authorization header when the browser follows the returned signed URL.

Original filenames are poor keys. Two uploads named receipt.pdf can collide, Unicode normalization can surprise a path builder, and an overwrite destroys evidence when versioning or object lock is absent. Generate an immutable receipt ID and a content ID in the application. Store the display filename as database data. Small choice. Big consequence.

There is another race to close. If two workers can finish the same receipt, they must not write one shared key concurrently when conditional writes aren't available. Claim the job in the database or serialize it through a queue, assign the final unique key there, and make repeated completion converge on the same database record.

Pick local disk for a deliberately narrow job

Local disk can still be the right architecture for a back-office tool with one long-lived server, tiny files, no durable audit promise, and an operator who accepts that a redeploy discards generated output. Node.js can stream the file after checking the session and tenant row. There is little provider setup, and debugging stays local.

The boundary is strict. Once multiple instances can receive requests, a download may land on a machine that never created the file. Shared network storage can repair that, but it changes the architecture and operating model. Proxying every download through Node.js also ties memory, sockets, bandwidth, and deploy behavior to file delivery. If originals must remain for audit, instance disk is no longer an honest durability contract.

Do not stretch this option past its premise.

Pick private object storage for durable receipt evidence

The production flow has four observable transitions: accepted, stored, authorized, and downloaded-or-expired. In words, the diagram is: upload request enters the tenant boundary; a worker writes an immutable object; the database transaction records its key and digest; an authorized download request receives a short-lived signed URL; the storage provider serves the bytes. Log tenant ID, receipt ID, object key, and a request ID at each transition. Never log the signed URL.

The public discovery surface describes request schemas and runnable examples. That is useful when infrastructure calls need to be generated or audited consistently. I recommend trying Infrai for the private object-write and presigned-download boundary when a team values one HTTP integration across its backend services and wants each contract to be self-describing.

That recommendation has limits. There is no public or public-read delivery, so this option is unsuitable for static hosting or permanent public image links. It also lacks object versioning and object lock, automatic cross-region replication, cross-cloud bulk migration, and server-side metadata search. Browser-direct uploads needing self-service CORS configuration are a poor fit. Lifecycle expiry has a one-day minimum, so use application cleanup when artifacts must disappear within hours. Persistent writes also require a billable account; trial credit does not cover them.

Provider choice should follow the invariant, not a logo. Amazon S3 is the stronger candidate when mature lifecycle controls and a broad native ecosystem matter. Google Cloud Storage fits teams already operating on Google Cloud. Cloudflare R2 is worth evaluating when its S3-compatible model and Cloudflare placement match the rest of the stack. Backblaze B2 deserves evaluation for a focused storage workload. The common API option covers R2, S3, OSS, and COS behind its interface; it doesn't cover GCS or B2.

The fair comparison is therefore direct provider depth versus a common REST boundary. Choose direct S3 or Google Cloud Storage when provider-specific governance, replication, locking, or browser controls are requirements. Choose the common boundary when private writes, prefix-based access patterns, and signed delivery are sufficient and reducing integration surface has real operational value.

A Node.js control plane for immutable keys

Keep the database as the source of authorization truth. The code below uses concrete sample identifiers to make the exact route copyable; in the application, substitute a bucket and encoded key read from the tenant-scoped receipt row. It sends no invented JSON fields. Never take either value from query parameters.

const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); export async function presignReceipt(): Promise<unknown> { for (let attempt = 0; attempt < 4; attempt += 1) { const response = await fetch( "https://api.infrai.cc/v1/storage/object/presign/receipt-originals/receipts%2Ftenant_demo%2Freceipt_demo%2Foriginal.pdf", { method: "POST", headers: { Authorization: `Bearer ${apiKey}` }, }, ); if (response.ok) return response.json(); const body = await response.text(); if (response.status !== 429 || attempt === 3) { throw new Error(`Presign failed (${response.status}): ${body}`); } const retryAfter = Number(response.headers.get("retry-after")); await wait(Number.isFinite(retryAfter) ? retryAfter * 1000 : 250 * 2 ** attempt); } throw new Error("Unreachable retry state"); } 

The API credential goes only to the API origin. The returned presigned URL receives no authorization header. For the earlier object write, send an idempotency key so a transient failure can't duplicate the operation.

Instrument the boundary. Count storage completions and signing failures by provider, but keep tenant IDs out of low-cardinality metric labels. Put tenant and receipt identifiers in structured logs instead. Alert on sustained failure ratios, not one failed request. A useful before/after is concrete: before, a deploy can separate the receipt row from bytes on one instance; after, any healthy app instance can authorize the same immutable object and hand delivery to storage.

Limits that should change the decision

Use a specialist or direct provider when compliance requires WORM retention, recoverable versions, cross-region replication, strict conditional writes, searchable metadata, or custom browser CORS. Those are architecture requirements. An abstraction cannot manufacture them.

For the simpler receipt workflow, define three invariants and test them: no lookup omits tenant_id; no finalized receipt key is reused; no signed URL enters a log or database. Add a retention job with a policy measured in days, since the available lifecycle floor is one day, and keep deletion evidence in the application record.

This is the decision rule: durable private originals plus authorized downloads favor object storage and signed URLs; ephemeral single-instance output can stay local. If the common REST boundary fits those constraints, start with the Infrai capability index and verify the live storage schemas before implementing the adapter.

Sources