The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Generating ZIP Files with Javascript

cjoshmartin.com
submitted
a year ago
bykaiserseahorsetoprogramming

Summary

How to generate a zip file (in memory) in the browser using javascript. You need to create an instance of JSZip and hold your file contents as blobs. You can run the 'zip.file' command as many times as you need. Just remember not to name files with conflicting names.
 digital clock analog clock web site website internet site site scoreboard-0
13

4 Comments

3
joseph
a year ago
Normally I think blog writers that complain about docs are just lazy but damn if those docs aren't some of the most useless lines I've ever read.
2
kaiserseahorseOP
a year ago
Probably could submit the specifics in this blog post as a doc change
2
justadev
a year ago
I get needing to do it browser side sometimes but it's probably much better to just do this on the server
2
kaiserseahorseOP
a year ago
Probably to offload the storage and bandwidth costs from temporary storing the files before zipping.