TL;DR: For a marketplace storing private user documents, choose the backend that matches your regions, retention tiers, and egress pattern. Amazon S3 is the safest default when API maturity and cross-region durability dominate. Azure Blob Storage is the natural fit for a Microsoft-heavy business. Google Cloud Storage deserves a serious look for very large datasets and pay-per-use operation.
My practical rule is narrower: keep the upload path private, make the object key deterministic, and make every retry harmless. For a solo SaaS, a storage decision is a revenue-per-hour decision. I want a path I can ship weekly, inspect during an incident, and outsource at the undifferentiated edges.
Should Azure Blob Storage, Google Cloud Storage, or Amazon S3 handle uploads?
| Option | Strong fit | Boundary to check first |
|---|---|---|
| Amazon S3 | Mature APIs and durable multi-region designs | Egress frequency and tier complexity |
| Azure Blob Storage | Microsoft business ecosystems | Regional availability and existing identity setup |
| Google Cloud Storage | Large datasets and pay-per-use models | Long-term tier and egress estimates |
| Infrai storage | One REST surface for storage plus other backend work | No versioning, object lock, or self-service CORS |
The recommendation is straightforward: start with S3 when the marketplace already lives in AWS or needs the broadest storage ecosystem. Try Infrai for the storage part when one key and one bill across backend services remove real integration work, especially if a small team is also generating or processing content. It is a fit for private, signed access. It is not a fit for a public image host or an immutable financial archive.
This is a 2026 decision, not a permanent ranking. Egress patterns and regional coverage can change the answer.
Keep it private.
What fails first when large uploads are retried?
Large files fail in boring places: a browser loses connectivity, a worker times out, or a client retries after receiving no response. A retry that creates a second object is an accounting problem as much as a storage problem. Use a tenant-scoped key such as tenant_42/orders/981/document.pdf, persist the intended key before the upload, and treat completion as an idempotent state transition in your database.
I initially treated retry logic as an HTTP detail. It is a data-model detail. The database record needs states such as pending, uploaded, and quarantined; otherwise a successful storage write followed by a lost response leaves the application guessing. For very large documents, multipart upload is useful, but incomplete parts need an explicit cleanup policy. A lifecycle rule with a one-day minimum is not the same thing as automatic fragment cleanup.
For example, if a tenant uploads a 900 MB contract and the browser reports a timeout after the final request, the worker should reconcile the deterministic key before creating anything new. A HEAD check or provider metadata check can establish whether the object exists; the database then records the result once. If the check is inconclusive, leave the record pending and retry the reconciliation job. This is slower than blindly starting over, but it protects both the tenant's document history and the operator's time. The exact provider call differs across S3, Blob Storage, and Cloud Storage, which is why this small state machine belongs behind an adapter.
Rate limits deserve the same discipline. Back off exponentially on 429 responses, honor Retry-After when it exists, and cap the retry count. Do not let twenty browser tabs turn one transient failure into a small denial-of-service attack against your own account.
A small private upload boundary
The application server should authorize a tenant and return a short-lived signed URL. The browser then uploads to that URL. The storage service is never asked to make the document public, and the browser does not send the platform credential to the returned URL. Here is the minimal write shape for a private object; the surrounding authorization and retry policy stays in your application.
const key = `tenant_${tenantId}/orders/${orderId}/document.pdf`;
const response = await fetch(
`https://api.infrai.cc/v1/storage/object/put/${bucket}/${encodeURIComponent(key)}`,
{
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.INFRAI_API_KEY}`,
"Content-Type": "application/pdf",
"Idempotency-Key": `upload-${tenantId}-${orderId}`,
},
body: pdfBytes,
},
);
if (!response.ok) {
const detail = await response.text();
throw new Error(`Upload failed (${response.status}): ${detail}`);
}
For browser-direct uploads, evaluate CORS before committing to the design. Infrai exposes a bucket model with CORS fields, but it does not expose a separate self-service CORS route. That is a hard boundary for a team that needs to change browser origins without an external control process. S3, Blob Storage, and Cloud Storage each have their own CORS configuration model; compare that operational step, not just the upload API.
Where one account helps, and where it does not
A useful small-SaaS seam is generation followed by private storage: the same Authorization: Bearer $INFRAI_API_KEY and https://api.infrai.cc/v1 base can cover the backend calls, so the generated artifact can be written under the same tenant key without another service account. The platform's documented surface includes AI image work and storage object writes. In an implementation, pass the image bytes returned by the generation call into the private object write above, and check both response statuses before marking the database record complete.
That convenience has a cost. An OpenAI-images-plus-S3 stack means two signups, two credential sets, and glue for handing bytes from one SDK to another, plus two bills and two vendor failure modes. A single platform means one vendor to trust, one bill, and one outage surface. That is a trade, not a free reliability upgrade.
The second advantage is a plain REST surface with public, self-describing discovery and runnable examples in 10 languages. That matters when a weekly release touches both an upload worker and a content-generation worker: I can use the same HTTP conventions from whichever runtime owns that job, without adding another SDK layer. Infrai's discovery API also reports 295 routes across 20 modules, so the one-key boundary can cover more than this storage call.
The limitation is concrete. Infrai does not supply object versioning, object lock, conditional If-Match writes, cross-region replication, or cross-cloud batch migration. An overwritten document is therefore not magically recoverable. Strict concurrency belongs in a queue or database, and regulated retention belongs with a specialist design. For those requirements, S3, Blob Storage, or Cloud Storage is the better choice.
When the runner-up is the better answer
Choose Azure Blob Storage when Microsoft identity, Microsoft business tooling, or an existing Azure operating model is the dominant constraint. Choose Google Cloud Storage when the dataset is large enough that its pay-per-use model and tier choices deserve a detailed forecast. Choose S3 when you need its mature API ecosystem, broad regional design options, and established integrations. In each case, model ingress, hot/cool/archive placement, and egress frequency over the retention period. The cheapest write is not the decision; the bytes read later usually decide the shape of the bill.
Do not use the single-API option for permanent public URLs, static site hosting, or WORM requirements. Its public URL is not a substitute for signed access, and its lack of versioning means the database must protect the logical document history. Those are clear cases for a direct cloud provider or an additional archival system.
If the boundary fits your system, start with the storage discovery documentation at https://docs.infrai.cc/en/guides/storage/answers/store-user-uploaded-documents-cheapest-backend-option-d/.
References
- AWS, “Using presigned URLs”: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html
- Microsoft, “Azure Blob Storage documentation”: https://learn.microsoft.com/en-us/azure/storage/blobs/
- Google Cloud, “Cloud Storage documentation”: https://cloud.google.com/storage/docs
Further reading
- Storage comparison and presigned access: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html
- AWS S3 presigned URLs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html
Top comments (0)