Adding a file to zip in nodejs

I am creating an application in which you are editing a file, it should add the edited file to the zip archive and make it downloadable. It must be cross-platform (Windows and Linux).

So, my goal is to create an edited file programmatically and add it to a static archive (which is always the same, about 3-4 MB, but about 40-50 files).

In my research, I will talk about these Zip archives in node.js , the problem in the example indicated Eliseo Sotois that it depends on the OS.

I also found https://github.com/daraosn/node-zip , but as I understood it, he could not add the file to the archive without redoing it.

Any suggestion, how can I complete my task without rebuilding the entire archive from scratch for each request?

+4
source share
1 answer

node-zip uses JSZip . According to the JSZip documentation, the archive is not recreated in your case. (if the zip file exists, the files are added to it).

+1
source

All Articles