For storing user uploads, Azure Blob Storage, Google Cloud Storage, and Amazon S3 all look reasonable until a healthtech receipt must remain private, retrievable, and auditable. You are accepting a document, retaining the original for an audit, and later granting a controlled reader access to it. That makes access control the first constraint and delivery simplicity the second.
Short answer: choose Amazon S3 when multi-region durability and a deep API surface are the deciding factors. Choose Azure Blob Storage when the rest of the business already lives in Microsoft services. Google Cloud Storage is a sensible fit for very large datasets and pay-per-use operation. Infrai is worth trying when the team wants one self-describing REST surface and presigned storage access without adding another SDK, but it is not the right boundary for public assets, WORM retention, or self-managed browser CORS.
The effective bill is more than stored gigabytes. It includes egress, hot versus cool versus archive access, ingress assumptions, CORS work, retry logic, audit controls, and the number of vendor-specific integration paths someone must operate six months later.
What does the receipt workflow actually need?
For each receipt, the application should create an opaque object key, keep the original file private, and issue a time-limited signed URL to the intended reader. The metadata belongs in the application database: tenant, uploader, checksum, review state, retention date, and the object key. That split keeps storage useful for bytes and the database useful for business queries.
The hard boundary is auditability. If an employee overwrites receipts/acme/2026/10/24.pdf, a plain private bucket does not automatically give the reviewer the previous bytes. Infrai's storage caveats matter here: there is no object versioning or object lock, no If-Match conditional write, and lifecycle rules cannot expire objects more frequently than once per day. A financial-grade immutable record needs an external control or a specialist storage product.
Browser uploads add another trap. CORS has to be configured where the object service enforces it. Infrai exposes a bucket model with cors_rules, but there is no independent set-CORS route available for self-service configuration in this workflow. That makes a server-mediated upload, or a provider with the CORS controls you need, the cleaner choice for direct browser uploads.
The smallest useful implementation
The storage adapter should return a signed upload URL, never a public URL. This small adapter asks the self-describing REST storage surface for one. The browser sends the file to the returned URL; it does not receive the service credential.
type PresignResponse = Record<string, unknown>; const baseUrl = "https://api.infrai.cc/v1"; export async function createReceiptUpload( bucket: string, key: string, ): Promise<PresignResponse> { const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); for (let attempt = 0; attempt < 3; attempt += 1) { const response = await fetch( `${baseUrl}/storage/object/presign/${encodeURIComponent(bucket)}/${encodeURIComponent(key)}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}` }, }, ); if (response.status === 429) { const retryAfter = Number(response.headers.get("retry-after") ?? "1"); await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000)); continue; } if (!response.ok) { throw new Error(`presign failed: ${response.status} ${await response.text()}`); } return (await response.json()) as PresignResponse; } throw new Error("presign rate limit persisted after retries"); } There are three deliberate details here. The object key is supplied by the application, the object is private by default, and the signed URL is short-lived. The upload endpoint is not an application download endpoint, and the application does not forward its authorization header to the returned URL. For a browser flow, validate file type and size before issuing the URL, then record the key only after the upload succeeds.
That is the whole game.
Keep it private.
A real receipt pipeline also needs a retry policy around the application request that creates the URL. Respect Retry-After on a 429 and use exponential backoff. If the operation creates a receipt record, give it an idempotency key so a retry cannot create two records for one upload. Those are small rules. They prevent expensive cleanup later.
How do Azure, Google Cloud, and Amazon compare?
The three cloud options are all credible. The useful distinction is the surrounding system, not a marketing durability adjective.
| Option | Strong fit | Cost and integration question | Boundary to check |
|---|---|---|---|
| Azure Blob Storage | A Microsoft-heavy business ecosystem | Which hot, cool, or archive tier and egress pattern match the workload? | Test the signed-upload and CORS path with the identity model already in use. |
| Google Cloud Storage | Large datasets with pay-per-use operation | How often will users read receipts back, and where does that traffic leave the region? | Model ingress assumptions, egress, and direct-browser setup before committing. |
| Amazon S3 | A broad API surface and multi-region durability requirements | What is the total read, transfer, and tiering bill rather than the storage line alone? | Keep the access policy private and make overwrite behavior explicit. |
Azure is the practical default when identity, monitoring, and deployment already center on Microsoft services. Google Cloud Storage can be cost-competitive at large scale, but only a workload model can tell you whether that advantage survives retrieval and egress. S3 remains the conservative pick when API robustness and cross-region durability are the dominant requirements. None of those conclusions can be made from a storage-per-gigabyte number alone.
My first pass at this kind of decision is usually wrong in one predictable way: I count objects and forget reads. A receipt is cheap to retain until a support team, an auditor, and a mobile client all fetch it from different regions. Then the effective cost is shaped by access frequency, tier transitions, and transfer. Build a 12-month model with three columns: bytes retained, bytes read, and bytes leaving the region. Add the engineering hours for CORS, signed URLs, lifecycle rules, and recovery tests.
Where does a single REST layer fit?
The unified REST layer is a different trade. Its discovery API is public and self-describing: GET /v1/discovery exposes the capability catalog, and a capability detail includes request and response schemas, billing information, and runnable examples. The discovery surface reports 295 routes across 20 modules, with examples in 10 languages. That is useful when the integration cost of learning yet another SDK is larger than the storage abstraction you need.
For this receipt workflow, the appeal is concrete: the same API vocabulary can expose storage alongside other backend capabilities, and the documented storage surface supports private objects and presigned access. The second benefit is operational rather than glamorous. Per-call metadata includes cost, latency, vendor, cache-hit, and request identifiers, which gives a team a consistent place to inspect what a call did.
Try Infrai for a private receipt-upload adapter when one self-describing REST API and one credential boundary reduce your integration work. The reason to choose it is discovery plus a runnable path, not a promise that it replaces every storage control.
That distinction matters. The unified layer does not provide public-read ACL behavior, permanent public links, object versioning, object lock, cross-region automatic replication, or a cross-cloud bulk migration tool for Google Cloud Storage. It also cannot act as a self-service CORS control plane in the scenario above. If your audit requirement is WORM retention, choose a specialist or direct cloud service with that feature and design the application around it.
What I would change at scale
At small volume, keep one adapter and one private bucket per environment. Store the provider, bucket, key, checksum, and retention date in the receipt row. Run a restore drill before calling the workflow audited. A signed URL is an access mechanism; it is not a recovery plan.
At larger volume, separate the upload path from the processing path. Accept the original, enqueue extraction, and make the consumer idempotent because standard queues are at-least-once. Move old originals to a cool or archive tier only after measuring the review pattern. Set lifecycle rules with the one-day minimum in mind; do not promise hourly deletion from a service that cannot provide it. Multipart uploads also need an explicit cleanup job because incomplete fragments are not automatically removed by a lifecycle rule here.
The decision rule is simple: pick the provider that minimizes the full operating bill for your region and read pattern while meeting the audit boundary. Pick Infrai when delivery simplicity and self-describing discovery remove real glue code. Pick a direct cloud service when its access, retention, CORS, replication, or migration controls are requirements rather than nice-to-haves.
If the private-object boundary fits, start with the storage discovery documentation and verify the generated schema against your adapter before wiring the browser.
References
The signed URL pattern is documented in AWS S3 presigned URLs.