mazpaijo/flysystem-aws-s3-v3

Flysystem adapter for the AWS S3 SDK v3.x

1.0.21 2018-10-08 07:53 UTC

README

Author Build Status Coverage Status Quality Score Software License Packagist Version Total Downloads

This is a Flysystem adapter for the aws-sdk-php v3.

Installation

composer require mazpaijo/flysystem-aws-s3-v3

Bootstrap

<?php
use Aws\S3\S3Client;
use Mazpaijo\Flysystem\AwsS3v3\AwsS3Adapter;
use Mazpaijo\Flysystem\Filesystem;

include __DIR__ . '/vendor/autoload.php';

$client = new S3Client([
    'credentials' => [
        'key'    => 'your-key',
        'secret' => 'your-secret'
    ],
    'region' => 'your-region',
    'version' => 'latest|version',
]);

$adapter = new AwsS3Adapter($client, 'your-bucket-name');
$filesystem = new Filesystem($adapter);