Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get .zip file with Node, unzip it and save it to disk by piping the response body into unzipper
const unzipper = require('unzipper');
const fetch = require('node-fetch')
// get data
.then(resp => {
return new Promise((res, rej) => {
.pipe(unzipper.Extract({ path: '/tmp/my-archive' }))
.on('error', rej)
.on('finish', res);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.