FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
3 Ways to ZIP Files Stored on Cloudflare R2
How-ToWeb Development

3 Ways to ZIP Files Stored on Cloudflare R2

via Dev.to WebdevRyan16h ago

You have files sitting in Cloudflare R2 and a user just clicked "Download All." Now what? R2 doesn't have a built-in "zip these objects" operation. You need to figure it out yourself. After building a file processing API that has archived 550K+ files and 10TB+ on R2, here are the three approaches I've found — each with very different trade-offs. Approach 1: Download Locally, ZIP, Re-upload The most obvious approach. Pull files down, zip them on your server, upload the archive back to R2 (or serve it directly). // Pseudocode const files = await Promise . all ( keys . map ( key => r2 . get ( key )) ); const zip = new JSZip (); files . forEach ( f => zip . file ( f . name , f . body )); const archive = await zip . generateAsync ({ type : ' nodebuffer ' }); // Serve or upload archive Pros: Simple to implement Works with any ZIP library (JSZip, archiver, etc.) Full control over the ZIP structure Cons: Memory killer. You're buffering everything. 100 files × 50MB = 5GB in RAM Slow. Download a

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
4 views

Related Articles

How I Learned to Actually Solve Coding Problems (Not Just Write Code)
How-To

How I Learned to Actually Solve Coding Problems (Not Just Write Code)

Medium Programming • 5h ago

How to Count a Billion Things with 12 Kilobytes
How-To

How to Count a Billion Things with 12 Kilobytes

Medium Programming • 6h ago

A Google Engineer Admitted Claude Code Did in 1 Hour What Her Team Spent a Year Building, And…
How-To

A Google Engineer Admitted Claude Code Did in 1 Hour What Her Team Spent a Year Building, And…

Medium Programming • 7h ago

The Skills That Actually Matter in Programming
How-To

The Skills That Actually Matter in Programming

Medium Programming • 8h ago

Pine Script vs ThinkScript vs EasyLanguage: Which Should You Learn?
How-To

Pine Script vs ThinkScript vs EasyLanguage: Which Should You Learn?

Medium Programming • 9h ago

Discover More Articles