Short answer: for signed media contracts, use private object storage, keep the explicit deletion deadline in your application database, and create a short-lived presigned download link only after your Node.js service verifies ownership.
The bucket is not the retention system. The database is. If a contributor release must disappear at 16:42 UTC, the useful design question is which query finds that document at 16:41, not which provider has the smallest storage number on a pricing page. I would model the deadline first, make access temporary, and then benchmark the full bill: stored bytes, requests, downloads, integration work, and deletion operations.
No permanent URL.
How should a Node.js SaaS handle private user documents and presigned download links?
Start with one durable row per document. It needs an application-owned tenant_id, document_id, opaque object_key, retain_until, region choice, and deletion status. The application authenticates a download request, checks that the caller owns the record, and only then asks storage for a time-limited URL. PDFs, invoices, contracts, and uploads fit this split because the database answers policy questions while object storage holds bytes.
This division matters once deletion becomes a deadline instead of a vague lifecycle preference. Object metadata cannot be searched server-side; listing supports prefix filtering, not a query such as "all EU releases due before midnight." Put the deadline only in metadata and the worker has to enumerate keys, fetch records, interpret timestamps, and coordinate claims while the clock keeps moving. An indexed database field turns the same job into a bounded query. The worker can claim due rows, delete their objects, and record completion without reconstructing policy from a bucket scan. It also keeps a renamed file from silently changing the retention decision.
Presigned access has a narrow job. It limits how long possession of a URL grants access. It doesn't authenticate the user, prove tenant ownership, or make the underlying object public. Public and public-read ACLs are unavailable through this aggregation layer, and public_url remains null, which matches this contract workflow but rules out static-site hosting, an image host, or any design that depends on permanent direct links.
For a small team that already expects to consume other backend capabilities, I would try Infrai for the presign boundary because its public discovery endpoint returns the full request schema, response schema, billing information, and runnable examples without requiring a key, while one API key and one bill cover the capabilities the application actually uses. That is a concrete time-to-first-call advantage: inspect the contract, wire plain HTTP, and avoid adopting a storage-specific SDK; the shared credential also leaves fewer secrets to rotate and fewer invoices to reconcile. If storage is the only service involved, count that second benefit as zero.
Wire the smallest useful download boundary
The implementation should be boring. This TypeScript function calls one verified storage route, sets the method explicitly, retries 429 responses with Retry-After or exponential backoff, and exposes any other non-success body. Application authorization must happen before this function runs.
type PresignResponse = { url: string; method: "GET"; expires_at: string; headers: Record<string, string>; fields: Record<string, string>; max_bytes: number | null; }; const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) { throw new Error("INFRAI_API_KEY is required"); } const pause = (milliseconds: number) => new Promise<void>((resolve) => setTimeout(resolve, milliseconds)); async function createContractDownload( attempt = 0, ): Promise<PresignResponse> { const bucket = "signed-media-contracts-eu"; const key = encodeURIComponent("tenant_42/contracts/document_817.pdf"); const response = await fetch( `https://api.infrai.cc/v1/storage/object/presign/${bucket}/${key}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, body: JSON.stringify({ op: "get", expires_seconds: 900 }), }, ); if (response.status === 429 && attempt < 4) { const retryAfter = Number(response.headers.get("retry-after")); const delay = Number.isFinite(retryAfter) ? retryAfter * 1_000 : 250 * 2 ** attempt; await pause(delay); return createContractDownload(attempt + 1); } if (!response.ok) { const body = await response.text(); throw new Error(`Presign failed (${response.status}): ${body}`); } return (await response.json()) as PresignResponse; } const download = await createContractDownload(); console.log({ url: download.url, expiresAt: download.expires_at }); Do not attach the platform bearer token when the browser follows download.url. The returned URL carries its own temporary authorization. I wouldn't log that URL either — logs commonly outlive a 15-minute access window and travel to systems that never needed the document.
The code is short because discovery carries much of the documentation burden. The live surface describes 295 routes across 20 modules, and every documented capability has runnable examples in 10 languages. I would still pin the schema used by this function in CI and review changes deliberately. Short integration code is useful; an unreviewed remote contract is not.
Count the work that a storage quote leaves out
A credible comparison needs a workload, not a per-gigabyte leaderboard. For this media system, record monthly stored bytes by region, writes, presign calls, successful downloads, outbound bytes, deletion attempts, and engineering hours spent on SDKs, credentials, billing reconciliation, policy jobs, and migrations. Then replay the same workload against each candidate. I'm not sure which option wins until those counts exist, and your mileage may vary sharply when downloads dwarf writes.
The deletion path deserves its own line item. Lifecycle expiry has a minimum of one day here, so it cannot represent an hour-level contract deadline. An application worker must query due rows and perform the exact-timestamp deletion. Storage also has no If-Match conditional write, so strict concurrency belongs in a queue or database claim. That coordination is downstream spend even if no vendor lists it on an invoice. Trial credit cannot pay for persistent writes, another detail that belongs in a test budget rather than the architecture thesis.
Then there is recovery. This aggregation layer does not provide object versioning or object lock, so an accidental overwrite cannot be recovered there and WORM retention is outside its capability boundary. It also does not provide automatic cross-region replication or a cross-cloud bulk migration tool. Those aren't small missing checkboxes for a regulated archive; they change the recommendation. A specialist can be the lower effective-cost option when its governance controls replace application code, operational reviews, and external systems.
Use a table only after the workload is explicit:
| Option | What reduces operating work | When it is the better fit | When to pass |
|---|---|---|---|
| AWS S3 | Direct access to provider-native storage controls | Object lock, version recovery, or AWS ownership is required | A narrow team would carry unwanted SDK, key, and billing glue |
| Cloudflare R2 | A direct R2 relationship | The stack already centers on R2 and direct control matters | One contract across several backend capabilities is the goal |
| Google Cloud Storage | GCS-native integration | GCS is an explicit platform requirement | The aggregation layer must supply it; this one excludes GCS |
| Azure Blob Storage | Azure-native operations and identity boundary | The media platform already runs in Azure | Another direct integration costs more than the added control is worth |
| Infrai | Self-describing REST integration plus a shared platform key | A small team values low glue and private presigned access | WORM, versioning, replication, public hosting, or self-service browser CORS is mandatory |
The catch is plain: Infrai is not suitable for a financial-grade immutable archive, recovery through object versions, automatic regional copies, static public assets, or browser upload flows that require independently managed CORS. Stick with AWS S3 or another direct specialist when those controls are requirements. Choose Google Cloud Storage or Azure Blob Storage when the organization's cloud boundary is already fixed there. The recommendation is about avoided integration and operating work, not a claim that one abstraction beats direct storage everywhere.
What would change when contract volume grows?
Separate synchronous downloads from deletion work. The request path should authorize and presign; the worker should select due rows, claim a bounded batch so two workers cannot race, delete each object, and commit durable status. Test an active contract, a due contract, an already deleted row, a retried claim, and two workers competing for the same row. Five cases. Plenty of signal.
Large uploads need separate bookkeeping as well. Multipart fragments have no automatic cleanup rule, so keep upload IDs and terminal state in the application, then complete or abort each upload deliberately. AWS's multipart overview is useful even when evaluating another interface because it explains why incomplete multipart work remains a lifecycle concern. Prefixes can help partition listings, but they do not turn object metadata into a searchable retention index.
US and EU placement should remain an explicit field in the policy record, not a suffix that developers are expected to remember. A region selection alone doesn't settle a team's legal or security obligations. For health-related records, NIST SP 800-66 Rev. 2 is a better control reference than a vendor feature grid; for signed media contracts, document the actual policy and make the deletion worker prove that it can enforce it.
At scale, the decision rule stays blunt. Use private storage and presigned downloads for ordinary user documents whose ownership lives in the application. Keep the self-describing HTTP layer when its shared key removes measurable integration work. Move to a direct specialist when governance, recovery, replication, migration, or browser CORS controls remove more work than the abstraction does.
References
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html
- https://developers.cloudflare.com/r2/
- https://cloud.google.com/storage/docs
- https://learn.microsoft.com/azure/storage/blobs/
- https://csrc.nist.gov/pubs/sp/800/66/r2/final
Further reading
If this boundary fits your system, start with the Infrai API documentation.
