/flysystem-aws-s3-v3

Flysystem Adapter for AWS SDK V3

Primary LanguagePHPMIT LicenseMIT

League\Flysystem\AwsS3v3 [BETA]

Author Build Status Coverage Status Quality Score Software License

CAUTION

This adapter is a WIP. The current stable version of the AWS S3 SDK is V2. This adapter will be updated with the latest changes when a stable version of the new (v3) SDK is released.

You're adviced to use v2 until this release: http://github.com/thephpleague/flysystem-aws-s3-v2

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

Installation

composer require league/flysystem-aws-s3-v3

Bootstrap

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

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

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

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