GithubHelp home page GithubHelp logo

kesarion / simple-archiver Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 227 KB

Archive multiple files, directories, buffers, streams and strings; supports 'zip' and 'tar' formats; can also extract to path

License: MIT License

JavaScript 100.00%

simple-archiver's People

Contributors

kesarion avatar

Stargazers

 avatar

Watchers

 avatar  avatar

simple-archiver's Issues

Installation behind proxy failing

Installing package behind coporate proxy is failing for kesarion/node-unzipper as github resolution is failing.
It would be better if we have dependency purely npm instead of github

[FEATURE REQUEST] Multi archive

Is compressing into parts of smaller files supported?
Main file 200mb

Compressed-1 50mb
Compressed-2 50mb
Compressed-3 50mb

how to output a buffer?

Greetings!

I am using simple-archiver just today and I think I am almost there.
I need to send the zip file as a buffer (I do not wish to save it to the fs)
I am getting an empty archive.
I have the following code:

        rows = [an array of objects]
        for(var i = 0;i < rows.length;i++){
            buffer3.push({ data: rows[i].FILE,       type: rows[i].TYPE,    name: rows[i].NAME });
        }
        archive([
            buffer3
        ], {
             format: 'zip',
             output: __dirname + '/files/'+ user + '/' + file
        })
        .then(socket.emit('zip-selected', {buffer3: buffer3}))
        .catch(console.log);

the code on the receiving end is:

       rtnSocket('zip-selected', [data, name], function(data){
            var name = $('#zip-input').val() + '.zip';
            var a = document.createElement('A');
                a.href = data.buffer3;
                a.download = name;
                a.click();
        })

can you see what I am doing wrong?

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.