JSPM

  • Created
  • Published
  • Downloads 15224
  • Score
    100M100P100Q132635F
  • License MIT

Download selected files from an Amazon S3 bucket as a zip file.

Package Exports

  • s3-zip

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (s3-zip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

s3-zip

Download selected files from an Amazon S3 bucket as a zip file.

Install

npm install s3-zip

Usage

var s3Zip = require('s3-zip');
var fs = require('fs');

var region = 'bucket-region';
var bucket = 'name-of-s3-bucket';
var folder = 'name-of-bucket-folder/';
var file1 = 'Image A.png';
var file2 = 'Image B.png';
var file3 = 'Image C.png';
var file4 = 'Image D.png';

var output = fs.createWriteStream(__dirname + '/use-s3-zip.zip');

s3Zip
  .archive({ region: region, bucket: bucket}, folder, [file1, file2, file3, file4])
  .pipe(output);