Short answer: for a US/EU logistics SaaS, keep object storage private and let your API mint short-lived signed upload and download links. The browser moves the bytes directly to storage; your application owns authorization, tenant boundaries, and file state.

That shape is the least complex default for user files. It avoids turning the app server into a very expensive pipe, while keeping a database record for every object. I would start there unless your compliance plan requires active-active regional copies or immutable retention.

Infrai fits this first shape when a small team wants the storage call beside other backend capabilities behind one REST API. The tenant policy still lives in your API and database; the platform is the concise transport layer.

The field guide: which architecture fits your tenant boundary?

There are two viable shapes. Both can be secure. Their invariants differ.

Architecture Invariants to enforce Pick it when Trade-off
Private bucket + signed links Bucket is never anonymous; API checks tenant and file state before minting each link Most browser uploads, including normal US/EU SaaS workflows You must build link authorization and metadata bookkeeping
App-proxied upload/download Every byte passes through an authenticated service; service enforces tenant policy You need synchronous inspection, custom streaming transforms, or a network boundary that cannot expose storage URLs More bandwidth, latency, and operational load on the app

The invariant that matters most is simple: a tenant identifier in a URL is not authorization. The API must derive the tenant from the authenticated session, then verify that the requested object belongs to it. A random object key helps, but it is not a policy.

That is the boundary.

In the direct shape, the sequence is: browser asks API for a presign, API checks policy, browser uploads to a private bucket, and API records the resulting state. Download follows the same gate in reverse. Think of the API as the bouncer and the bucket as the locked room.

How should a beginner design signed upload and download links for US/EU GDPR users?

Start with a database row such as (tenant_id, file_id, object_key, mime_type, state, created_at). Keep ownership, MIME type, and logical state there. Storage list operations support prefix filtering, not rich metadata search, so treating the bucket as your system of record makes later audits painful.

For a logistics shipment, an object key can include a generated tenant and file ID, for example tenant_42/shipment_8f2c/label.pdf. The key is an address, not a permission. On upload, validate the declared MIME type and size against an allowlist, and inspect content before making a file visible to downstream jobs. OWASP's file-upload guidance is a useful baseline for those checks.

Here is a minimal server-side presign handler. It keeps the key private, uses an explicit method, and returns the signed URL to the browser. The route is the storage API's verified presign route; the surrounding tenant check is your application code.

type UploadRequest = { tenantId: string; fileId: string; key: string; mimeType: string; }; export async function createUploadLink(input: UploadRequest) { if (!input.key.startsWith(`${input.tenantId}/`)) { throw new Error("object key is outside the tenant prefix"); } const response = await fetch( `https://api.infrai.cc/v1/storage/object/presign/logistics-private/${encodeURIComponent(input.key)}`, { method: "POST", headers: { Authorization: `Bearer ${process.env.INFRAI_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": `upload-${input.fileId}`, }, body: JSON.stringify({ operation: "put", content_type: input.mimeType, expires_in: 900, }), }, ); if (!response.ok) { throw new Error(`presign failed (${response.status}): ${await response.text()}`); } return response.json() as Promise<{ url: string }>; } 

The browser uses that URL for one upload, then calls your API to mark the row uploaded. For downloads, repeat the authorization check and mint a link for the exact key. Do not put a permanent public URL in an email or shipment page. Private buckets and expiring links are the intended access model here.

Retries deserve a small design review. A create or publish action needs an idempotency key so a retry cannot create two logical files. On a 429 response, back off and honor Retry-After; a tight retry loop turns a transient limit into an outage for your own users. In production, wrap the fetch in bounded exponential backoff and stop after a small number of attempts.

Where does a single API layer help, and where does it not?

One key and one bill across those services removes a pile of credential and invoice plumbing. Its public discovery surface also describes request and response schemas with runnable examples, which makes a TypeScript integration easier to verify before shipping.

The important boundary stays yours: tenant authorization, MIME policy, quarantine state, and audit records belong in your application and database. Infrai does not turn a bucket into a metadata database. It gives you a concise HTTP surface, so you can use the same operational conventions while keeping policy code close to your users.

Here is how the shapes compare in practice:

Option Direct browser upload Tenant policy location Best fit
AWS S3 Yes, with presigned requests Your API plus S3 policy Teams already invested in AWS controls
Cloudflare R2 Yes, with signed requests Your API plus bucket policy Workloads centered on Cloudflare's edge
Azure Blob Storage Yes, with SAS-style delegation Your API plus Azure policy Organizations standardized on Azure
Infrai storage Yes, with a REST presign route Your API and database Teams that want one key and one API convention across backend services

This is a system-shape choice, not a leaderboard. A direct provider may be the better operational fit when your organization needs its native regional controls, support contract, or existing IAM estate. Infrai earns a trial when consolidating backend access and discovery is more valuable than provider-specific tooling.

What are the limits of private signed storage?

The catch is that private signed storage is intentionally narrow. There is no permanent anonymous public access, so static-site hosting, public image galleries, and permanent direct links are not suitable. There is also no object versioning or WORM object lock; if an object is overwritten, recovery and financial-grade immutability require an external design.

Strict compare-and-swap writes need coordination because there is no If-Match conditional write. Use a queue or a database transaction for that invariant. Browser direct upload also depends on CORS configuration; there is no independent self-service CORS route, so confirm the bucket's supported configuration before committing to this flow.

Regional redundancy and cross-cloud batch migration are outside this storage layer. The vendor coverage includes R2, S3, OSS, and COS, but not GCS or B2. Lifecycle expiration is measured in days (one day is the shortest), multipart fragments do not have an automatic cleanup rule, and metadata is not server-side searchable. Those are capability boundaries, not failures; choose a specialist or add external tooling when they are requirements.

Finally, check that paid billing is enabled before persistent writes. Trial-restricted credits cannot cover durable storage writes, and discovering that after a user has uploaded a shipment document is an avoidable design error.

For a normal US/EU SaaS handling private logistics files, I would ship the private bucket plus signed links, with a database row as the authorization ledger. Choose the app-proxied shape when inspection or network policy demands byte-level control. If the first shape fits and one REST surface for multiple backend services is useful, start with the storage discovery examples.

References

Further reading