node-archiver icon indicating copy to clipboard operation
node-archiver copied to clipboard

how to not make duplicate file

Open weituotian opened this issue 7 years ago • 2 comments

image

zip.append(stream, {name: 'imgs/' + picName1});
zip.append(stream, {name: 'imgs/' + picName1});

it will add the same file twice, i want to overwrite it? how to?

weituotian avatar Apr 12 '19 08:04 weituotian

I know it is a bit late but you can make the date constant and it will overwrite

 archive.append(Buffer.from(content, "utf8"), {
      name: "slides.json",
      date: new Date(2025, 7, 8, 23, 4),
    });

marksamfd avatar Aug 12 '25 20:08 marksamfd

好~( ̄▽ ̄)~*

weituotian avatar Aug 12 '25 20:08 weituotian