Skip to content

PHP library to efficiently stream contents from an AWS S3 bucket or folder as a zip file.

License

Notifications You must be signed in to change notification settings

jmathai/s3-bucket-stream-zip-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4da4b06 · Nov 29, 2015

History

20 Commits
Nov 28, 2015
Nov 28, 2015
Nov 28, 2015
Mar 6, 2015
Mar 6, 2015
Mar 6, 2015
Mar 6, 2015
Nov 29, 2015
Nov 28, 2015
Mar 6, 2015
Mar 6, 2015

Repository files navigation

S3BucketStreamZip

Build Status Scrutinizer Code Quality Code Coverage

Overview

This library lets you efficiently stream the contents of an S3 bucket/folder as a zip file to the client.

Installation

Installation is done via composer by adding the a dependency on jmathai/s3-bucket-stream-zip-php.

composer require jmathai/s3-bucket-stream-zip-php
composer install

Usage

// taken from examples/simple.php
// since large buckets may take lots of time we remove any time limits
set_time_limit(0);
require sprintf('%s/../vendor/autoload.php', __DIR__);

use JMathai\S3BucketStreamZip\S3BucketStreamZip;
use JMathai\S3BucketStreamZip\Exception\InvalidParameterException;

$stream = new S3BucketStreamZip(
            // $auth
            array(
              'key'     => '*********',   // required
              'secret'  => '*********'    // required
            ),
            // $params
            array(
              'Bucket'  => 'bucketname',  // required
              'Prefix'  => 'subfolder/'   // optional (path to folder to stream)
            )
          );

$stream->send('name-of-zipfile-to-send.zip');

Authors

Dependencies

About

PHP library to efficiently stream contents from an AWS S3 bucket or folder as a zip file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages