Node.js Cloud Storage Considerations for AI-Generated Receipt Images and Audit Access A developer outlined a Node.js pattern for storing AI-generated receipt images in private cloud storage, keeping original bytes immutable under unguessable object keys with SHA-256 digests and generation metadata recorded alongside each record. Access is granted only through short-lived signed URLs minted after an application-level authorization check, with a two-step read flow that lets the browser download directly from storage instead of proxying through the server. The writeup warns that overwriting a fixed key like receipts/order-1842.png on regeneration destroys the chain of custody, and that a signed URL is a bearer capability rather than a permission model. The key considerations for storing AI-generated images in cloud storage are integrity, retention, and access control. For e-commerce receipts, keep the original private and immutable, then issue short-lived delivery access only after your application has checked the caller. Storage preserves evidence; the application decides who can see it. Store the original bytes under an unguessable object key, with a content hash and receipt metadata in a database. Keep the bucket or container private. Upload directly from a trusted service or a narrowly scoped client request, and deliver a time-limited signed URL only after authorization. Do not make the URL the permission model. A signed URL is a bearer capability. Anyone holding it can use it until it expires or is revoked by the storage system's rules. That makes expiry, scope, audit logging, and leakage handling part of the receipt workflow, not optional polish. For generated receipt images, I would also keep the generation input and output metadata beside the object: model identifier, prompt or template reference, generation timestamp, MIME type, byte length, and SHA-256 digest. The image is the evidence. The metadata explains how it got there. In practice, this is the smallest record that lets an operator answer a later audit question without downloading every candidate image. A preview is disposable. An original used for a refund dispute or tax review is not. Those two assets should have different operational treatment even when they begin as the same upload. A common failure is to overwrite receipts/order-1842.png when a customer asks for a regenerated image. That destroys the chain of custody and makes an innocent retry look like an edit. Use an immutable object key instead: type ReceiptObject = { orderId: string; revision: number; digest: string; }; function objectKey receipt: ReceiptObject : string { return receipts/${receipt.orderId}/${receipt.revision}/${receipt.digest}.png ; } The database row can point to the object key and record its state: created , verified , quarantined , or released . The storage key itself should not encode an email address, product name, or other customer data. Object listings and logs tend to travel farther than the application team expects. I first thought a digest was mainly useful for deduplication. It is more useful as a cheap integrity check. Compute it before or during ingestion, persist it with the receipt record, and verify the stored object before marking the record verified . A successful upload is not the same thing as a verified business artifact. The clean boundary is a two-step read: The browser then downloads from storage instead of forcing the application server to proxy every image. That reduces application bandwidth and keeps the authorization decision in one place. It also creates a sharp responsibility: the application must never mint a URL before its policy check succeeds. A minimal Node.js interface keeps that policy visible. The storage adapter can be replaced, while the caller still sees the same contract. type AuditRequest = { operatorId: string; orderId: string; reason: string; }; type ReceiptRecord = { orderId: string; objectKey: string; status: "verified" | "released"; }; interface ReceiptStore { findVerified orderId: string : Promise