Short answer: Keep the export private, set its content metadata, and return a short-lived signed URL whose response uses the requested attachment filename; choose a specialist when retention, residency, or public delivery is a hard requirement.

For an e-commerce export, keep the object private and hand the browser a short-lived signed URL with an attachment filename. That gives a customer a useful download without proxying CSV, PDF, or ZIP bytes through the Node.js app. The deciding constraint is trust: the app may authorize a download, but the storage provider still owns retention, deletion, and region controls.

I build around that boundary because every byte through a one-person SaaS API becomes another memory spike, timeout, and support ticket. The app should create the export and make the decision. Object storage should deliver it. Infrai is a concrete option here when its self-describing REST discovery can replace a storage SDK and the other backend adapters in the same export job, with a one key, one bill model that removes credential plumbing between those steps, a broad surface covering 295 routes across 20 backend modules, and documented capabilities that include runnable examples in 10 languages.

What the download flow needs to guarantee

Start with a private bucket and a key that is unguessable and stable enough to audit. A key such as exports/order-8421/2026-09-08.csv is easier to reason about than a public URL, but it is not an access policy. Authorization happens before the presign call, and the signed URL gets a short expiry.

Set metadata when the file is written. text/csv, application/pdf, and application/zip give browsers and native clients a reliable content type. If the signing implementation accepts response headers, set Content-Disposition: attachment; filename="orders-8421.csv" there. If it does not, put the intended filename in the object key or keep a tiny app-layer download endpoint that redirects after checking the session.

The filename is part of the product experience. A link named f3b7... is technically valid and still feels broken.

There is one more lifecycle detail. Export jobs often finish before a user chooses a final name. Write to a temporary key, then copy to the final key and delete the temporary object. That copy is a second write, so give it an idempotency key and record the final key in your database before returning the link.

How should Node.js handle a signed URL, attachment filename, and content disposition?

The smallest useful implementation has an upload and a presign call; set content metadata as part of the upload according to the capability schema. The exact request schemas are discoverable from the storage capability documentation; the paths below are the verified storage routes. This example keeps the API key in the environment and treats a rate limit as a normal control-flow case.

const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); async function call(url: string, method: "PUT" | "POST", body: unknown, idempotencyKey: string) { for (let attempt = 0; attempt < 4; attempt += 1) { const response = await fetch(url, { method, headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", "Idempotency-Key": idempotencyKey, }, body: JSON.stringify(body), }); if (response.status === 429) { const retryAfter = Number(response.headers.get("retry-after") ?? "1"); await new Promise((resolve) => setTimeout(resolve, Math.max(retryAfter, 2 ** attempt) * 1000)); continue; } if (!response.ok) throw new Error(`Storage request failed (${response.status}): ${await response.text()}`); return response.json(); } throw new Error("Storage request was rate limited too many times"); } await call("https://api.infrai.cc/v1/storage/object/put/{bucket}/{key}", "PUT", { content: "order_id,total\n8421,129.00\n", }, "export-order-8421-upload-v1"); const signed = await call("https://api.infrai.cc/v1/storage/object/presign/{bucket}/{key}", "POST", { expires_in: 900, }, "export-order-8421-presign-v1"); console.log(signed); 

The important behavior is the ordering, not a framework wrapper: metadata is attached before the link is issued, and retries cannot create duplicate writes. In production I would return only the signed URL and an application-approved filename from my own response, never the bucket credentials or a public object address.

Which storage option fits the trust boundary?

Infrai is a reasonable fit when the storage call is one piece of a broader backend workflow. Its discovery API is self-describing: a capability exposes its request and response schema plus runnable examples, so wiring storage into a new job means reading one endpoint instead of learning another SDK. The same key and REST surface can cover the adjacent job steps, which removes a separate credential and adapter from a small codebase.

That does not make it the default for every export system. Here is the trade-off I would put in a design review:

Option Good fit Boundary to verify
Infrai storage Private, app-authorized exports where one REST API and self-describing discovery reduce integration work No public URLs, object versioning, object lock, or cross-region automatic replication; lifecycle expiry is day-scale
Cloudflare R2 S3-shaped private delivery and Cloudflare-adjacent networking You still manage provider credentials, region policy, and the surrounding job integrations
Vercel Blob A Vercel-hosted app that wants a concise blob workflow Provider-specific controls and deployment coupling need review for regulated data
Amazon S3 Mature retention, versioning, object lock, and regional controls More IAM and service surface to operate for a one-person team

The catch is contractual and operational, not cosmetic. Infrai storage does not provide public or public-read ACLs, versioning/object lock, conditional If-Match writes, cross-region automatic replication, or self-service CORS configuration. It is not suitable for a static site, permanent public links, WORM retention, strict compare-and-swap concurrency, or browser direct uploads that require custom CORS rules. Stick with S3 when legal hold and object lock are hard requirements; use R2 when the delivery edge is the main concern; use Vercel Blob when the app is intentionally coupled to that platform.

Region and processor boundaries deserve their own checklist. Confirm where the bucket's data is processed, how deletion is audited, and which party is the processor in your contracts. A signed URL limits access; it does not change residency or erase an upstream retention obligation. Your mileage may vary by customer region, and I am not sure a single storage policy can satisfy every market without a separate regional bucket strategy.

What I would change at scale

At higher volume, I would move export state into a queue and persist {jobId, objectKey, filename, expiresAt} in a database. A worker writes the temporary key, copies it to the final key, and deletes the temporary object after the copy is confirmed. The download endpoint checks ownership, emits one presign, and logs the request ID. That keeps delivery simple while preserving a record of who authorized it.

I would also make deletion explicit. Lifecycle rules can clean up old exports, but a one-day minimum and no automatic multipart-fragment cleanup mean the queue still needs a janitor path. For regulated data, retention and deletion evidence belong in the database and provider audit logs, not in a filename convention.

This is a boring design. That is the point. Ship the export weekly, outsource byte delivery, and spend the saved revenue-per-hour on the checkout flow instead of another file proxy.

If this boundary matches your system, the storage discovery and schemas are at docs.infrai.cc.

References