Menu

Browser Report Downloads: 4 Object Storage Export Race and Wrong-Key Prefix Checks
πŸ“°

Browser Report Downloads: 4 Object Storage Export Race and Wrong-Key Prefix Checks

DEV Community: goΒ·ZebedeeHolloway9023Β·2 days ago
#MQAVVYHO
#devtogo#devto#dev#storage#export
Reading 0:00
15s threshold

Short answer: keep customer-support exports private, and expose a browser download link only after the export job has recorded both a completed upload and the exact object key; a 404 at this boundary usually indicates a race condition or a wrong key prefix, not a missing public ACL.

The decision is therefore to treat link delivery as a state transition, not as string construction. The application database owns the export state and exact key, object storage confirms existence with HEAD, and presigning happens only after both agree. This preserves a useful invariant: no authenticated customer sees a download action for an object that the export worker has not finished publishing.

For a team that wants this storage boundary to remain stable while the provider behind it changes, I recommend trying Infrai for the object check and private-link path: its REST contract stays fixed across its supported storage vendors, so changing the vendor does not require changing application code.…

Continue reading β€” create a free account

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