Menu

1 / 2

How to Fix Large CSV PDF Export Download Timeouts — Object Storage Presigned URL Recovery

DEV Community: node·PeregrineShaw9645·3 days ago
#cqljizIQ
#devtonodejs#devto#dev#range#response
Long article (1395 words) — no AI summary yet.
Reading 0:00
15s threshold

Short answer: treat an export as a resumable file transfer, not one long request. Put the report in object storage, issue a short-lived presigned URL only after authorization, and let the browser retry with byte ranges while your service records progress and validates the final size.

I build file-export links for authenticated media customers, where a report can be a modest CSV one hour and a multi-gigabyte PDF the next. The first implementation usually looks sensible: generate the file, proxy it through Node.js, and wait for one 200 response. Then a customer closes a laptop lid, the network changes, or the browser spends longer downloading than the URL lifetime. The export is complete, but the download is not.

The useful distinction is between generation and delivery. Generation has a job status and an immutable object. Delivery has independent authorization, a time budget, and recovery rules.…

Continue reading — create a free account

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