unzip-to-s3

    1.0.0 • Public • Published

    unzip-to-s3

    Unzip files directly to Amazon S3 using streams.

    Install

    npm install unzip-to-s3 --save
    

    Usage

    var fs = require('fs');
    var unzipToS3 = require('unzip-to-s3');
     
    // Create the S3 client
    var bucketUpload = unzipToS3.createClient({
      key: 'some_key',        // required
      secret: 'some_secret',  // required
      bucket: 'some_bucket',  // required
      path: 'some/path'   // optional
    });
     
    // Create the zip read stream
    var zipStream = fs.createReadStream('path/to/some/file.zip');
     
    // Unzip and upload
    bucketUpload(zipStream).on('data', function (file) {
      // "file" is the file stream and object that was inflated
      // from the zip file
    }).pipe(process.stdout);

    Client Options

    • key - your AWS key
    • secret - your AWS secret
    • bucket - your S3 bucket
    • path - the path to store your objects on S3

    unzip-to-s3 uses Knox underneath, so refer to their Client Creation Options for all client options.

    Run tests

    npm install
    npm test
    

    Install

    npm i unzip-to-s3

    DownloadsWeekly Downloads

    78

    Version

    1.0.0

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • scottcorgan