# s3downloadzip

> Download Multiple files as Zip from AWS S3 or Digitalocean Spaces or any s3 compatible object storage service

Latest version **1.0.3** (published 2024-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install s3downloadzip
pnpm add s3downloadzip
yarn add s3downloadzip
bun add s3downloadzip
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-05-05 |
| First published | 2022-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrew Eze |
| Maintainers | andychukse |
| Keywords | s3, archiver, zip, stream |

## Links

- npm: https://www.npmjs.com/package/s3downloadzip
- Repository: https://github.com/andychukse/s3downloadzip
- Homepage: https://github.com/andychukse/s3downloadzip#readme
- Issues: https://github.com/andychukse/s3downloadzip/issues
- npm.io page: https://npm.io/package/s3downloadzip

## Dependencies (2)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1167.0
- [archiver](https://npm.io/package/archiver.md) ^5.3.1

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2024-05-05
- 1.0.2 — 2022-07-05
- 1.0.0 — 2022-07-05

## README

# S3downloadzip

## Description
This package helps you download multiple files from AWS s3 or Digitalocean Spaces as a zip file without storing the files. 
You can download multiple files as a zip file.

## Contributing

Thank you for considering to contribute.

## Installation

Type ```npm install s3downloadzip ``` or ```yarn add s3downloadzip``` 


## Usage

```
'use strict';
import {s3DownloadMultiple} from 's3downloadzip';
import aws from 'aws-sdk';


export async function downloadMultiple(req, res) {
  try {

    const bucket = process.env.AWS_S3_BUCKET;

    var files = [
    {name: 'file'},
    {name: 'file'}
    ];
    var fileName = 'sample_file'; //you can set optional zip file name here, if empty it will generate a random name

    const s3 = new aws.S3({
    accessKeyId: process.env.AWS_S3_ACCESS_KEY_ID,
    secretAccessKey: process.env.AWS_S3_SECRET_ACCESS_KEY,
    Bucket: bucket,
    signatureVersion: 'v4'
    // endpoint: process.env.AWS_S3_ENDPOINT,
  });



  await s3DownloadMultiple({
    s3: s3, 
    files: files, 
    bucket: bucket,
    res,
    fileName: fileName 
    });

  } catch (err) {
    throw err;
  }
}

```

---
_Source: https://npm.io/package/s3downloadzip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
