Back to articles
How to Add 'Download All as ZIP' to Your SaaS in 30 Minutes
How-ToSystems

How to Add 'Download All as ZIP' to Your SaaS in 30 Minutes

via Dev.to TutorialRyan

Your users uploaded 200 photos. Now they want to download them all. What do you do? The naive approach — loop through files, zip them on your server, serve the result — falls apart fast. Memory spikes with large files. Egress fees add up. You need temp storage, cleanup jobs, and error handling for partial failures. I hit this exact wall building a file-sharing service that's now processed 550K+ files and 10TB+ of archives. After weeks of wrestling with ZIP64, streaming, and Cloudflare Workers' 128MB memory limit, I turned my solution into an API. Here's how you can skip that pain entirely. The 30-minute version Step 1: Get an API key Sign up at eazip.io (free tier, no credit card). Grab your API key from the dashboard. Step 2: Collect your file URLs You already have these — they're in your database. S3 presigned URLs, R2 public URLs, any HTTPS endpoint that returns a file. const fileUrls = await db . query ( ' SELECT file_url, original_filename FROM uploads WHERE project_id = ? ' , [ p

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
3 views

Related Articles