Questions tagged [node-archiver]

node based file and directory archiving with streaming interface, modular plugins can enable other archive formats to be written simply.

node based file and directory archiving with streaming interface, modular plugins can enable other archive formats to be written simply. For more details checkout on the github repository at https://github.com/archiverjs/node-archiver

42 questions
0
votes
1 answer

node-archiver : Getting duplicate parent zip upon extracting

I have written below for zipping a directory : const archiver = require('archiver'); let createArchive = function(sourceDir, destDir) { const archive = archiver('zip'); const stream = fs.createWriteStream(destDir); return new…
Pawan Saxena
  • 521
  • 1
  • 4
  • 14
0
votes
2 answers

Node.js: wait for zip file to be generated and send response

I am generating a zip file using the module archiver. I want to wait for the zip file to be generated before proceeding further. Below is the relevant part of the code. // create a file to stream archive data to. const archiver =…
opensource-developer
  • 2,826
  • 4
  • 38
  • 88
0
votes
1 answer

using archiver module with downloadable online links

In a node application, I wish to download a zip file that contains pdfs downloaded from various urls on the internet (where if I type the url into a browser, it just directs me to download a pdf). I've been using the archiver module which is…
user11508332
  • 537
  • 1
  • 11
  • 28
0
votes
1 answer

how to prompt where to download zip file created with archiver in node

I am trying to create a zip file in node using the code provided from how to create a zip file in node given multiple downloadable links, as shown below: var fs = require('fs'); var archiver = require('archiver'); var output =…
user11508332
  • 537
  • 1
  • 11
  • 28
0
votes
0 answers

Zip an audio file In NodeJS with archiver in fly

I use node-youtube-dl to have a stream to download a video and I want to convert it to mp3 using fluent-ffmmpeg. I also want to zip this mp3 audio to send to the client to download it but I cannot figure how to zip the mp3 audio. I find every corner…
dnp1204
  • 471
  • 5
  • 14
0
votes
1 answer

how to exclude current log file while archiving log files inside a directory

I have to archive a directory in which log file are present(File names are in a format as i.e 2017-12-06.log).I have to archive all files except 2017-12-06.log. I have a logs directory where all log files are present and a script create-zip.js.…
HOTAM SINGH
  • 121
  • 2
  • 11
0
votes
2 answers

How to pipe a WriteStream concatenating an extension?

I am new in NodeJS. I know we can stream data to the client by using pipe() method. Here is the snippet of the code router.get('/archive/*', function (req, res) { var decodedURI = decodeURI(req.url); var dirarr =…
NIKHIL C M
  • 3,873
  • 2
  • 28
  • 35
0
votes
1 answer

nodejs zip archiver issue with directory path in windows

I'm having an issue with using zip.directory in Windows. This is the file structure I'm trying to create: . ├── file1.txt ├── file2.txt └── file3.txt file2.txt and file3.txt are coming from a directory called dir. Here is the code I have on my…
inhwrbp
  • 569
  • 2
  • 4
  • 17
0
votes
1 answer

Resizing and zipping image streams using archiver and sharp

I'm trying to download some images, resize them, zip them, and serve from an endpoint using streams. I'm using sharp for the resizing and archiver for the zipping. I can get these packages to work on their own but not together. Here's some example…
Dan
  • 3,229
  • 2
  • 21
  • 34
0
votes
1 answer

Grunt + custom node-archiver task not working

I have a directory lib/grunt-tasks parallel to my Gruntfile.js. It has a zip.js file in it (loaded via loadTasks). It requires the node-archiver and fs modules. For some reason, although the .zip file is created, it contains nothing after…
daleyjem
  • 2,335
  • 1
  • 23
  • 34
0
votes
2 answers

How to properly download a .zip file using Node Js, Archiver and Express

I am attempting to zip the contents of two directories and download the resulting .zip file. One directory contains .txt files and the other .jpg. I am using archiver to zip the files and running the express framework on node js. I am inclined to…
mgperkowski
  • 11
  • 1
  • 3
0
votes
1 answer

NodeJS archive manager

I need to get the content of archives and then I want to uncompress the selected one - but I dont want to uncompress the archives to know what's in it. I'd like to list and uncompress at least zip and rar, but (if that's possible) I don't want to be…
SUhrmann
  • 632
  • 1
  • 8
  • 26
1 2
3