s3-mass-downloader/s3-mass-downloader

Solution for bulk files streaming from S3 to ZIP archive

0.2.0 2023-10-26 12:16 UTC

This package is auto-updated.

Last update: 2024-04-26 13:24:47 UTC


README

This library allows you to download the provided list of files from S3 storage into a single zipped file.

What is important, the downloaded files are not stored on the disk on the server, but are streamed directly to the zip file to be downloaded by the user's browser.

Prerequisites

Installation

  • install library with composer: composer require s3-mass-downloader/s3-mass-downloader
  • use the library in your code (see the examples/basic-usage.php file)

Usage

  • create an instance of the StreamingClient class. As a parameters please provide an instance of the S3Client class from the AWS SDK and the name of the bucket from which you want to download the files.
  • call downloadZippedFiles($listOfFilesToDownload) method. As a parameter please provide an array with the list of absolute files path that you want to be downloaded.
  • please see the examples/basic-usage.php file for more details.