want to rewrite a text file inside existing zip folder

22 views
Skip to first unread message

rahulka...@gmail.com

unread,
Apr 24, 2019, 6:54:16 AM4/24/19
to Khan Academy Javascript Technical Q&A

How to rewrite the existing text file inside zip archive through javascript JSZip? Want to change the data of file input.js where value1 variable is having the data.

var JSZip = require('JSZip');
fs.readFile( "files/FIB_typing.zip", function(err, data) {
if (!err) {
var zip = new JSZip();
zip.file("input.js", value1);
}
});

Reply all
Reply to author
Forward
0 new messages