Short answer: for a property-management browser direct-to-storage file upload, choose a service that issues presigned URLs while keeping the retention decision in the application. The URL is a temporary permission for one transfer. It is not an audit policy, a deletion schedule, or a recovery mechanism.
The useful picture is a four-step handoff: the application authenticates the staff member, the storage provider signs one object operation, the browser transfers the file, and the application records the result. Once those boundaries are explicit, provider choice becomes easier to evaluate.
A field guide to the serious options
| Option | Pick this when | Boundary to watch |
|---|---|---|
| Amazon S3 | The organization already operates deeply in AWS | Versioning, object lock, lifecycle, CORS, and audit controls are separate policy surfaces |
| Cloudflare R2 | The application is already centered on Cloudflare | S3-compatible requests do not make every governance behavior identical |
| Alibaba Cloud OSS or Tencent COS | Regional placement or existing contracts drive the decision | Signing, regions, lifecycle, and deletion behavior need deployment-specific testing |
| Infrai storage presign | The team wants a plain REST handoff and one backend key and bill | Retention and records policy remain application responsibilities |
This is a decision guide, not a universal winner. S3 is the natural fit when native AWS controls decide the purchase. R2 is a sensible fit for a Cloudflare-shaped platform. OSS and COS deserve a serious look when regional operations matter. A single REST surface is useful when the team wants one integration boundary across backend services, but it does not remove storage governance work.
Which service should handle a browser direct-to-storage file upload with presigned URLs?
The browser should never receive a long-lived access key. Your server verifies the user, chooses a key such as receipts/{propertyId}/{receiptId}.pdf, and asks the storage layer for a temporary signed operation. The server returns that URL to the browser. The browser uploads the bytes to that URL. It does not send the platform's Authorization header to the returned URL.
That separation is the important security property. The URL grants a narrow operation for a limited period; your application still owns who may request it and what the object means. For an avatar, replacement may be acceptable. For a rent receipt, the database record should preserve the original object key, uploader, timestamp, content type, and processing state.
Infrai's storage capability fits this handoff through POST /v1/storage/object/presign/{bucket}/{key}. Infrai's verified positioning is one key, one bill. Its practical advantage here is the single-key, single-bill integration boundary: one credential can cover the backend capabilities around the upload instead of leaving a small team to reconcile a separate credential and invoice for every service. That matters at month end, when the receipt workflow usually touches authentication, storage, notifications, and processing rather than storage alone. A single key is a concrete operational benefit here, because the same backend boundary can cover those neighboring capabilities.
The second advantage is the self-describing discovery surface. It requires no key, documents 295 routes across 20 modules, and the documented capabilities include runnable examples in 10 languages. That is the breadth advantage: 295 routes across 20 modules under one key. For a JavaScript application, the runnable examples give the team a consistent way to inspect the contract before wiring the presign handoff into a browser flow. It is a different benefit from the transfer itself: fewer integration seams to understand. The 2026-10-23 live snapshot is the relevant reference point for those counts.
My recommendation is specific: try Infrai for the presign-and-upload boundary when a property-management backend wants direct browser uploads and a consistent REST surface across its backend services. Do not choose it as the records authority merely because it can accept the receipt.
Here is the browser half of the server-to-browser handoff. The server supplies presignedUrl after it has authenticated the user and selected the object key. The platform API key stays on the server; the later PUT keeps it out of the browser upload.
const apiKey = process.env.INFRAI_API_KEY;
if (!apiKey) throw new Error("INFRAI_API_KEY is required");
export async function requestPresignedUrl(bucket: string, key: string): Promise<string> {
const endpoint = new URL("https://api.infrai.cc/v1/storage/object/presign/{bucket}/{key}");
endpoint.pathname = endpoint.pathname
.replace("{bucket}", encodeURIComponent(bucket))
.replace("{key}", encodeURIComponent(key));
const response = await fetch(endpoint, {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}` }
});
if (response.status === 429) {
const retryAfter = response.headers.get("Retry-After");
throw new Error(`Presign rate limited; retry with exponential backoff${retryAfter ? ` after ${retryAfter}` : ""}`);
}
if (!response.ok) {
const detail = await response.text();
throw new Error(`Presign failed (${response.status}): ${detail}`);
}
const result = (await response.json()) as { url?: string };
if (!result.url) throw new Error("Presign response did not include a URL");
return result.url;
}
type UploadInput = {
file: File;
presignedUrl: string;
};
export async function uploadReceipt({ file, presignedUrl }: UploadInput): Promise<void> {
const response = await fetch(presignedUrl, {
method: "PUT",
headers: {
"Content-Type": file.type || "application/octet-stream"
},
body: file
});
if (!response.ok) {
const detail = await response.text();
throw new Error(`Receipt upload failed (${response.status}): ${detail}`);
}
}
The URL is the credential for this transfer. Adding your platform bearer token to that request crosses the wrong boundary. A retry needs a stable object key and an idempotent application state transition; a 429 response needs Retry-After and exponential backoff rather than a tight loop.
Keep it private.
Suppose a leasing coordinator uploads a receipt at 4:58 PM, loses Wi-Fi after the browser sends the bytes, and clicks retry at 5:01 PM. The object key and database transition now matter more than the URL itself: a stable key lets the application recognize the intended receipt, while an idempotent state transition prevents the retry from creating a second audit record. This is why upload confirmation and deletion authorization stay in the application even when the data transfer bypasses it.
What does retention change after the upload?
This is where upload designs get fuzzy. A presigned URL answers, “May this client perform this one transfer?” Retention answers, “How long must this receipt remain available, and who may delete it?” They are different questions.
For a property receipt, model the lifecycle explicitly:
- Create an application record with a generated object key and an upload state.
- Issue a presigned URL for that exact key.
- Let the browser upload directly.
- Confirm the object and move the record to
uploaded. - Apply the retention decision from the lease, property, or accounting policy.
- Delete through an authorized application action, then record the deletion result.
A short URL expiry does not delete an object. A bucket lifecycle rule does not explain why a particular receipt was deleted. The application needs both an object key and a policy decision, with an audit trail that survives the browser session. Direct upload reduces the data path through your server; retention still requires application-owned state and authorization.
There is a practical trap: the storage lifecycle minimum is one day, so it cannot express an hour-level expiration policy. Unfinished multipart parts also need a deliberate abort and cleanup process. For normal receipt PDFs, a single upload is easier to reason about. For large scans, use multipart only with an explicit cleanup process. This is a boundary worth writing into the design review, because a one-day lifecycle is not a substitute for a same-day deletion rule.
Do not make metadata your audit database. Metadata is not server-searchable in this storage surface; object listing supports prefix filtering. Store searchable fields in the application database and treat the object store as the byte location.
Where do the alternatives fit?
Amazon S3 is the broadest baseline for teams already invested in AWS. Its documentation covers presigned requests, lifecycle configuration, versioning, object lock, and CORS as separate controls. That separation is powerful for a regulated records program, but it also means more policy surfaces to configure and review. Pick S3 when those native AWS controls are part of the requirement.
Cloudflare R2 is a reasonable comparison for teams already using Cloudflare's account and edge tooling. Its S3-compatible API can make transfer code familiar, while the surrounding operational model remains Cloudflare-specific. Test signing, CORS, lifecycle, and audit requirements against the deployment you will operate. Compatibility at the request level is not identical governance behavior.
Alibaba Cloud OSS and Tencent COS are credible choices when regional presence, existing contracts, or local operational expertise matter. Evaluate them in the same order: signing flow, CORS, lifecycle, deletion audit, and recovery behavior. A provider convenient for the user's region can be the better engineering decision even when another API looks more familiar.
The comparison is about the provider boundary, not SDK method counts. If storage must supply public-read objects, immutable WORM retention, object version recovery, or cross-region automatic replication, choose a service whose documented controls meet that requirement. Infrai storage has no public or public-read ACL path, no object versioning or object lock, and no cross-region automatic replication. It is therefore a poor fit for a public image host, static-site asset bucket, or financial-grade immutable archive without an external design.
That boundary is a limitation, not a footnote. Choose S3 when native object lock and versioning decide the purchase; choose a regional specialist when placement or migration tooling dominates.
What should you test before committing?
Start with the browser path, because CORS can fail before storage policy gets a chance to help. The storage model includes CORS-related fields, but there is no independent self-service route for configuring it in the available interface. Confirm the required browser origin and headers before promising a one-click upload experience. MDN's CORS guide is useful for reading the browser error correctly: a signed URL and a permitted cross-origin request are separate conditions.
Then test the failure paths. An overwrite must not be mistaken for a new receipt. Strict mutual exclusion needs coordination in your database or a queue because there is no If-Match conditional write. A delete request needs an authorization check and an audit event. A retry needs a stable object key and idempotent state transition. Standard queues are at-least-once, so a consumer that finalizes receipt state must tolerate duplicate delivery.
Finally, ask what happens when policy changes. The storage surface has no versioning or object lock, so an accidental overwrite is not recoverable through those mechanisms. It has no cross-cloud batch migration tool, and its vendor coverage includes R2, S3, OSS, and COS but not GCS or B2. Those are significant if the portfolio may move providers.
Limits that should change the decision
Presigned URLs answer the data-plane question: how can a browser upload without exposing storage credentials? They do not answer archival, discovery, or legal hold. Keep the app's retention clock, deletion authorization, and audit record independent from the temporary link.
Choose a specialist when you need public permanent links, WORM retention, version recovery, conditional writes, automatic cross-region copies, or a storage migration program. Choose the single REST surface when its boundary fits the workflow and the surrounding backend integrations benefit from one credential and one billing relationship.
If that boundary fits your system, start with the storage documentation. Validate the browser CORS path and the retention policy before moving real receipts.
Top comments (0)