Menu

Large ZIP Export Multipart Upload and Signed Download Links in a Node.js Worker (3 Parts)
📰

Large ZIP Export Multipart Upload and Signed Download Links in a Node.js Worker (3 Parts)

DEV Community: node·ColbyHayes3521·about 18 hours ago
#WWPSNw40
#devtonodejs#devto#dev#storage#export
Long article (1203 words) — no AI summary yet.
Reading 0:00
15s threshold

For a large ZIP export, let the Node.js worker own a multipart upload, then hand the browser a short-lived signed download link. That decision keeps tenant boundaries in server code and makes a failed export restartable instead of making a user start over. I care about revenue per hour, so the useful question is which storage contract gets a first result this week without creating a second operations job.

The constraint that changed my design

An export is a file, but it is also a concurrent job. Two tenants can request the same report name at nearly the same time. A shared key invites an overwrite, and this storage capability has no strict conditional If-Match write. I use a unique object key per export job ( tenantId/exportId.zip ) and keep the export record in my database. The object key defines the isolation boundary; the database is the state machine.

Multipart upload is safer for a big archive because each part can be retried without rebuilding the whole ZIP.…

Continue reading — create a free account

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