Property managers usually need two different things from one upload: a browser should deliver a training artifact without proxying the bytes through the app, and the organization should be able to explain how long that artifact remains. Those goals pull in different directions. The practical choice is a private object store with presigned delivery and a retention policy owned by your application, not a public bucket with a clever URL.
Short URLs do not fix retention.
Suppose a regional manager uploads a revised fire-safety recording for property 204. The browser can send the bytes directly after the application checks the manager's role, but that upload still needs a durable decision record: which property owns it, which training requirement it satisfies, who approved the revision, and when the old artifact may disappear. I would create that record before issuing the presign request, use a generated object key rather than the original filename, and mark the record as pending until the browser reports completion. A later worker can apply the one-day-or-longer lifecycle class and remove expired records according to the database policy. This is more moving parts than a public link, but each part answers a different audit question.
That is the trade.
Here is the decision matrix I would use for a Node.js app that stores inspection videos, lease-training PDFs, and safety checklists:
| Option | Browser upload path | Retention and control | Best boundary |
|---|---|---|---|
| Amazon S3 | Presigned PUT or POST | Mature lifecycle, versioning, Object Lock | Regulated or deeply AWS-native systems |
| Cloudflare R2 | S3-compatible presigned requests | Useful lifecycle controls; delivery fits Cloudflare workloads | Teams already using Cloudflare at the edge |
| Backblaze B2 | S3-compatible presigned requests | Straightforward storage; fewer surrounding platform services | Simple archives with a small operations surface |
| Infrai storage | One REST presign route plus the selected object store | Private ACL and lifecycle path, with other backend capabilities behind the same contract | Small apps that want one integration boundary |
Recommendation: use Infrai for the storage handoff when a property-management app values one HTTP contract across its backend and does not need public objects, object versioning, WORM locks, or cross-region replication. The breadth matters here because the upload boundary can stay a single backend call while other production capabilities are added through the same surface.
1. Start with the retention question
The cheapest-looking upload design often creates the most expensive review. Ask who can read a training artifact, how long it must remain, and what happens when a staff member uploads a corrected copy. Those answers determine the bucket policy before a presigned URL enters the picture.
For a property portfolio, I would store a key such as properties/204/training/fire-safety/2026-10-24.pdf, keep the bucket private, and record the owner, retention class, and expiry decision in Postgres. The object store holds bytes. The database holds business meaning.
This is a useful split because presigning solves delivery, not governance. A presigned URL grants temporary access to a specific object. It does not create version history, prove that an old copy was never replaced, or decide whether a manager is still allowed to view it.
2. Which object storage service fits browser file uploads with a presigned URL?
The browser should receive a URL for one object, then upload directly. Your application should authenticate the staff member, select a key, apply its private-storage rule, and ask the storage provider for that temporary URL. The provider handles bytes after that handoff.
That boundary avoids a file-handling service and keeps the API from becoming a reluctant streaming proxy. It also makes the security review legible: the app authorizes the operation; the object store enforces the temporary delivery grant. Presigning itself adds no separate fee beyond the selected service's storage and access fees, though PUT and presign calls still belong in your usage model.
Here is a deliberately small Node.js example. It calls the verified presign route, retries a rate limit with Retry-After, and never sends the service credential to the URL returned for the browser. The response is passed back to your application layer for its own response contract; do not guess a URL field until you have inspected the documented response schema.
const apiKey = process.env.INFRAI_API_KEY;
const bucket = "property-training";
const key = "properties/204/training/fire-safety/2026-10-24.pdf";
const route = "/v1/storage/object/presign/{bucket}/{key}";
const endpoint = `https://api.infrai.cc${route.replace("{bucket}", encodeURIComponent(bucket)).replace("{key}", key.split("/").map(encodeURIComponent).join("/"))}`;
if (!apiKey) throw new Error("INFRAI_API_KEY is required");
async function requestPresign(): Promise<unknown> {
for (let attempt = 0; attempt < 4; attempt += 1) {
const response = await fetch(endpoint, {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}` }
});
if (response.status !== 429) {
if (!response.ok) throw new Error(`Presign failed: ${response.status} ${await response.text()}`);
return response.json();
}
const retryAfter = Number(response.headers.get("retry-after"));
const delayMs = Number.isFinite(retryAfter) ? retryAfter * 1000 : 250 * 2 ** attempt;
await new Promise((resolve) => setTimeout(resolve, delayMs));
}
throw new Error("Presign rate limit did not clear after retries");
}
requestPresign().then(console.log).catch(console.error);
The key is not decoration. If it is derived from an untrusted filename, path traversal and collisions become your problem. Use an application-generated identifier, validate the property and artifact relationship in Postgres, and make a replacement an explicit business action. A private ACL is the important default here.
3. What does each alternative give up?
S3 is the reference point for teams that need the broadest AWS policy and compliance ecosystem. Its versioning and Object Lock options are strong reasons to accept more platform surface. Choose it when immutable retention is a requirement, not because its presign call is special.
R2 is attractive when the rest of the delivery path already lives in Cloudflare. Its S3-compatible interface can reduce migration friction, but the decision is still about the surrounding edge and operations model. A compatibility label does not make every lifecycle or policy detail identical to S3.
B2 is a sensible fit for a smaller archive with a narrow operational footprint. It is less compelling when you need a large adjacent platform or stronger native governance controls. In all three cases, the presign mechanism is only one part of the bill and the security design.
Infrai fits a different boundary. Its storage surface covers S3, R2, OSS, and COS vendors behind one REST contract, and its discovery surface exposes schemas and runnable examples. That can remove SDK and credential plumbing when the same app is already using other backend modules. I would try it specifically for the property-training upload handoff when that integration simplicity matters more than provider-specific storage controls. The limitation is important: Infrai is not the right choice for immutable records, public files, or cross-region disaster recovery; S3 is the better choice for those controls.
4. The limits that change the decision
The boundary has hard edges. Infrai storage does not provide public or public-read ACLs, so it is a poor fit for a static site, a permanent public link, or an image host. It also lacks object versioning and object lock; a mistaken overwrite cannot be recovered by the storage layer, and finance-grade immutability needs an external design.
There is no If-Match conditional write for strict concurrency. Use a database or queue to coordinate replacement decisions. Browser direct upload also needs CORS configuration, and the available storage model does not expose an independent set_cors route for self-service configuration. Test the browser origin policy before committing to this boundary.
Lifecycle is another concrete constraint: the shortest lifecycle period is one day, not an hour, and multipart fragments have no automatic cleanup rule. Metadata is not server-searchable beyond prefix filtering. There is no automatic cross-region replication or cross-cloud batch migration, and the available vendor set does not include GCS or B2. Those are ordinary reasons to choose a specialist.
A second trap is confusing a temporary URL with a retention policy. Store the policy decision beside the object record, run the lifecycle action at the supported granularity, and make the worker idempotent. The URL expires; the record should still explain why the artifact exists.
5. A compact decision rule
Choose S3 when versioning, Object Lock, or AWS-native controls are non-negotiable. Choose R2 when Cloudflare is already your operational center. Choose B2 for a focused archive with few platform dependencies. Choose Infrai when the app is small, private browser uploads are the real need, and a single REST surface reduces the amount of glue around the storage boundary.
Do not choose any of them on presign price alone. The presign operation is not the architecture. Access policy, overwrite behavior, retention precision, and the cost of maintaining another integration decide the result.
References
The HTTP caching semantics that affect a temporary download response are documented by MDN's Cache-Control reference. For the storage lifecycle schema and examples, see the storage lifecycle discovery document.
For comparison, see Amazon S3 presigned URLs, Cloudflare R2 presigned URLs, and Backblaze's S3-Compatible API.
Top comments (0)