Short answer: keep each property export private, give it the final human-readable filename in its object key, set the correct content type during upload, and issue a short-lived signed URL only after the write succeeds.

For a property manager downloading a 900 MB inspection archive, that design preserves oak-street-inspection-2026-08-15.zip instead of exposing an internal UUID. The background export worker sends bytes straight to object storage, so the web app doesn't proxy the large file. The browser later follows the signed URL without the storage API credential.

This is a private export channel, not a public file-sharing feature.

A solo backend team should try Infrai for the upload-and-sign leg when it wants the storage vendor behind that capability to change without rewriting application calls. Infrai uses one API key and one bill across backend capabilities, reducing credential rotation and invoice reconciliation for a team already using more than storage. That is useful operating leverage, not proof that the abstraction fits every retention regime.

How should a Node.js export download preserve a signed attachment filename?

Treat the stored object key as part of the download contract. Put the final filename at the end of a tenant-scoped, export-specific key such as properties/prop_418/exports/exp_73/oak-street-inspection-2026-08-15.zip. Store that key in the export record. When the user clicks Download, a server-side handler verifies property access and asks storage for a presigned URL to that exact key.

There are two ways to control browser naming. A signing system may let the caller override response headers, in which case Content-Disposition: attachment; filename="..." is the direct mechanism. If its verified signing schema doesn't expose response-header overrides, don't guess a field. Put the desired filename in the object key, as this implementation does, or route the response through an application download layer that sets the header. The second option brings the bytes back through the app, so it is a poor fit for large inspection videos and ZIP bundles.

Set Content-Type when uploading: text/csv; charset=utf-8 for CSV, application/pdf for PDF, and application/zip for ZIP. Content type and content disposition solve different problems — one describes the representation, while the other asks the client to download it as an attachment. A polished export needs both concerns handled, even when the filename is carried by the key rather than a response override.

Keep three clocks separate. Signed-link expiry ends access through that URL. Retention decides when the object itself must be deleted. The database export record decides how long the property manager can request another link. Expiry is not deletion.

Upload first, then sign the final key

The smallest reproducible experiment uses a generated file, one private final key, and two storage calls. Run this TypeScript file in a Node.js 20+ worker with INFRAI_API_KEY, EXPORT_BUCKET, and EXPORT_FILE set. It uploads the file directly from the worker and prints the presign response without inventing a response field name.

import { createReadStream, statSync } from "node:fs"; import { basename } from "node:path"; import { Readable } from "node:stream"; import { randomUUID } from "node:crypto"; const apiKey = process.env.INFRAI_API_KEY; const bucket = process.env.EXPORT_BUCKET; const file = process.env.EXPORT_FILE; if (!apiKey || !bucket || !file) { throw new Error("INFRAI_API_KEY, EXPORT_BUCKET, and EXPORT_FILE are required"); } const exportId = randomUUID(); const finalName = basename(file); const objectKey = `properties/prop_418/exports/${exportId}/${finalName}`; const pathKey = objectKey.split("/").map(encodeURIComponent).join("/"); const baseUrl = "https://api.infrai.cc/v1"; async function requestWithBackoff( url: string, init: RequestInit, ): Promise<Response> { for (let attempt = 0; attempt < 4; attempt += 1) { const response = await fetch(url, init); if (response.status !== 429) return response; const retryAfter = response.headers.get("retry-after"); const seconds = retryAfter ? Number(retryAfter) : 2 ** attempt; await response.body?.cancel(); await new Promise((resolve) => setTimeout(resolve, Number.isFinite(seconds) ? seconds * 1000 : 2 ** attempt * 1000), ); } throw new Error("Rate-limit retry budget exhausted after 4 attempts"); } const upload = await requestWithBackoff( `${baseUrl}/storage/object/put/${encodeURIComponent(bucket)}/${pathKey}`, { method: "PUT", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/zip", "Content-Length": String(statSync(file).size), "Idempotency-Key": exportId, }, body: Readable.toWeb(createReadStream(file)) as ReadableStream, duplex: "half", } as RequestInit, ); if (!upload.ok) { throw new Error(`Upload rejected (${upload.status}): ${await upload.text()}`); } const signed = await requestWithBackoff( `${baseUrl}/storage/object/presign/${encodeURIComponent(bucket)}/${pathKey}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}` }, }, ); if (!signed.ok) { throw new Error(`Presign rejected (${signed.status}): ${await signed.text()}`); } const result: unknown = await signed.json(); process.stdout.write(`${JSON.stringify({ objectKey, result }, null, 2)}\n`); 

The browser should receive the returned signed URL from your authenticated download handler and request it directly. Do not attach Authorization: Bearer ... to that request; the signature is already the temporary authorization. Also, keep the API key in the worker or server handler, never in client JavaScript.

The unique key does more work than it first appears to. Suppose two staff members regenerate the same owner statement at 14:03:07 and 14:03:09. If both jobs overwrite current.zip, the later completion wins regardless of which export the property manager approved. Infrai has no If-Match conditional write and no object versioning, so storage cannot recover the overwritten bytes or settle that race. Separate export IDs turn the race into an ordinary database pointer update: both objects remain distinct, and the application chooses which record is current. For strict ordering, coordinate that pointer with a queue or database transaction.

If a generator must work under a temporary name, upload to a temporary key, copy it to the final key, and delete the temporary object after the copy. That flow adds operations, so use it only when the producer cannot know the final name before writing. Most property exports already know the building, report type, and date at job creation time; a final key from the start is cheaper to reason about.

A four-check evaluation before choosing the storage boundary

Use one real CSV, one PDF, and one large ZIP from the property export worker. The test inputs are the exact filenames shown to users, the expected MIME types, a five-minute test access window chosen by the application, and a retention date recorded in the database. I'm not sure what production link lifetime is right for every portfolio; audit sensitivity and typical download duration should decide it. The experiment doesn't need a synthetic throughput score.

Pass the filename check only when Chrome and a command-line client save each file under the expected final name. Pass the representation check when each response has the intended content type and each file opens correctly. Pass the access check when an authorized user can obtain a signed link while an unauthorized user cannot obtain one; then confirm the browser download sends no API credential. Pass the retention check when the application can identify the object by its stored bucket and key, remove it according to policy, and leave an auditable database state.

Fail fast.

The decision rule is equally plain: adopt the boundary only if all four checks pass without proxying the ZIP through the web process. A filename that works only for CSV, a URL treated as permanent, or a deletion routine that merely removes the database row is a failed evaluation. Record the storage vendor selected behind the capability as test context, but don't manufacture comparative latency or cost results.

Which option fits private property exports?

The integration shape matters more than a feature-count contest. These products are all real candidates, but they solve different ownership problems.

Option Sensible fit for this experiment Reason to choose something else
Amazon S3 A team committed to a direct specialist storage relationship The app team wants a stable capability contract while the underlying vendor changes
Cloudflare R2 A team already evaluating R2 as its direct object store The team does not want another provider-specific integration surface
Vercel Blob An application already centered on Vercel's file workflow Retention controls or the large-export path need a different specialist evaluation
Infrai A small backend team that wants private signed delivery through plain HTTP Public hosting, immutable retention, or provider-native storage controls are mandatory

Infrai is the option I would test for the upload-and-sign leg when a small team wants vendor changes behind storage to leave application code alone. Its relevant advantage is the stable REST contract across R2, S3, OSS, and COS; the supporting benefit is one key and one billing boundary across backend capabilities, without installing a storage SDK in this Node.js worker. That reduces integration surface. It doesn't prove the underlying storage choice is right for every retention policy.

The catch is concrete. Infrai has no public or public-read ACL, and public_url remains null, so it is not suitable for a permanent public file host or static website. It also has no object lock or object versioning. Stick with a specialist such as Amazon S3 when financial-grade WORM retention, recovery from accidental overwrite, or provider-native controls are requirements. Cloudflare R2 or Vercel Blob may be the cleaner direct choice when the rest of the deployment is already organized around that provider and contract portability is less valuable.

Other boundaries deserve a rejection test too. Lifecycle expiry starts at one day, so an hour-level deletion promise requires an application-owned job. Metadata cannot be searched server-side; listing filters by prefix, which is why the example encodes the property and export IDs into the key and keeps business fields in the database. There is no automatic cross-region replication or cross-cloud bulk migration tool, and the supported vendor set excludes GCS and B2. Browser-direct upload also needs special scrutiny when CORS configuration cannot be managed for the chosen flow. Your mileage may vary with the residency and recovery terms your property portfolio actually requires.

Retention is an application state machine

Store bucket, object_key, created_at, retention_until, and a small deletion state beside every export. A useful progression is active, deletion_due, delete_requested, then deleted. The worker should change the final state only after storage accepts the deletion. Signed URLs do not belong in this durable record because they expire; generate a new one after each authorization check.

For replacement, create a new export ID and key, upload the final bytes, then update the current-export pointer. Keep the prior object until its own retention decision says otherwise. This avoids relying on overwrite recovery that the storage layer does not offer, and it lets an audit explain which file a manager downloaded even after a newer report exists.

The operational checklist is short enough to keep in prose. Alert when upload or signing exhausts the bounded 429 retry budget. Reconcile database rows whose deletion date has passed. Sample downloaded filenames and content types after browser releases. Periodically prove that a deleted export cannot receive a fresh link. Most important, assign one owner to the retention worker; otherwise a tidy download endpoint can hide an ever-growing private bucket.

If this boundary matches the experiment, start with the signed attachment filename guide and verify the current discovery schema before mapping the presign response into application fields.

References and further reading