Nodejs and update file inside zip archive
问题 I want update file in zip arhive with nodejs . For example i have zip file with two files: a.zip |-a.txt |-b.txt I use archiver: var archiver = require('archiver'); var archive = archiver('zip', {}); archive.pipe(fs.createWriteStream('./a.zip')); archive.append(fs.createReadStream('./c.txt'), { name: 't.txt' }); archive.finalize(); But I have a problem, my archive is completely overwritten. As a result, I get: a.zip |-t.txt If I use: archive.file('./a.txt', { name: 't.txt' }); the result