Comments (5)
does testing the archive with winrar (think its a feature) say anything?
technically, if you pipe
to res
you shouldnt need to call res.end()
as it should get emitted to the res
via pipe
. I haven't used archiver
in such ways but most that do haven't reported any issues yet, not to say there isn't one. It typically comes down to the way its used and platform.
from node-archiver.
I do have this gist, that shows a similar process, albeit not from S3.
https://gist.github.com/ctalkington/5734444
from node-archiver.
Alright, what's weird is that it used to work well before. And testing your gist, that process works flawlessly. So I'll dig around and figure out what's my problem.
EDIT: By the way, Winrar test feature just says that the archive is corrupted.
from node-archiver.
Alright, all my fault, sorry about that. I was not loading the S3 files correctly. Here's the code I'm using now:
s3.get(__path__).on('response', function(res){
var buffer = new Buffer(parseInt(res.headers['content-length'], 10));
res.on('data', function(chunk){
buffer.addChunk(chunk); // See node-bufferjs for addChunk.
});
res.on('end', function(){
archive.append(buffer, {
name: __name__
}, callback);
});
}).end();
Thanks for your help!
from node-archiver.
Glad you worked it out!
from node-archiver.
Related Issues (20)
- Document how to `.append()` a directory
- Issue when zipping specific image - archive never finishes HOT 3
- CVE-2018-25046 "Zip Slip"?
- Zlib Memory Consumption
- Update dependency for `archiver-utils` (deprecation warning) HOT 2
- Node 20 tests failing with open handles
- Fails to stream to S3 using AWS SDK v3 HOT 14
- How to wait till the zipping completed HOT 2
- How to make the compression structure consistent with the win11 default compression structure
- 压缩后文件的修改时间不正确
- achiver.directory can't use, error with input source must be valid Stream or Buffer instance error HOT 1
- How to zip single file HOT 1
- Dependency Dashboard
- ESM HOT 1
- .directory() generate a empty folder, compress completed will remove the empty folder,could I retain the empty folder?
- Class extends value undefined is not a constructor or null HOT 1
- Is there a way to know how many files were ultimately compressed? HOT 2
- Question: Were there any API changes from 5.3 to 6.x? HOT 1
- Recommendation for an unzip library? HOT 1
- Overwrite existing files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-archiver.