Giter Site home page Giter Site logo

Comments (5)

ctalkington avatar ctalkington commented on June 5, 2024

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.

ctalkington avatar ctalkington commented on June 5, 2024

I do have this gist, that shows a similar process, albeit not from S3.

https://gist.github.com/ctalkington/5734444

from node-archiver.

jValdron avatar jValdron commented on June 5, 2024

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.

jValdron avatar jValdron commented on June 5, 2024

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.

ctalkington avatar ctalkington commented on June 5, 2024

Glad you worked it out!

from node-archiver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.