Menu

Node.js Browser Download Link 404s — Object Storage Export Job Race Conditions
📰

Node.js Browser Download Link 404s — Object Storage Export Job Race Conditions

DEV Community: node·EthanBrooks1647·about 1 hour ago
#3UAdldKi
#devtonodejs#devto#dev#export#storage
Reading 0:00
15s threshold

Short answer: treat a tenant export as unpublished until the worker has stored the exact completed-object identity in a durable record. A browser download link should be derived from that record, never from a filename guessed when the job was queued. This turns a confusing object-storage 404 into a small set of inspectable state transitions.

For a healthtech system that stores product images and builds a tenant-scoped ZIP, large-file throughput makes the distinction matter. The HTTP request that starts the work and the worker that completes the archive are separate owners. A fast queue can widen that gap; it cannot make an unfinished archive downloadable.

Why does a browser download link hit an object storage 404 after an export?

Start with the requested object key, copied byte for byte from the access log, and compare it with the key on the completed export record. Do not reconstruct it from a display filename, an object listing, or a route parameter.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.