zip-local | simple zipping/uzipping of local files | File Utils library
kandi X-RAY | zip-local Summary
kandi X-RAY | zip-local Summary
very simple zipping/uzipping of local files and directories in node.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Extracts the path into a compressed file .
- Zips a directory into a zip file .
- Extracts a zip file into a directory .
- PRIVATE Zip Folder
- Zipped fs .
- Create a zip file .
- augments plugin options
- Counts the number of dots in a dir
zip-local Key Features
zip-local Examples and Code Snippets
const express = require('express')
const fs = require('fs')
const port = process.env.PORT || 1337
const zipper = require('zip-local')
const app = express()
app.post('/checkFunc', (req, res) => {
// If you're going to use synchrono
Community Discussions
Trending Discussions on zip-local
QUESTION
I have a nodejs
microservice, where I zip
a folder containing 3 files which have been created by the code.
Now, i need to send this zip file as response
when my service gets a curl request
. I read through similar questions but they suggest how to download on client side, not sure how to use them here.
My nodejs code is :
...ANSWER
Answered 2018-Jul-31 at 01:38If you know the path of the zip then you can create a readable stream using fs.createReadStream()
and use pipe()
to pass the data from the stream directly to the response.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zip-local
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page