Skip to content

Commit

Permalink
Update readme.md to describe usage of Aws\S3\S3MultiRegionClient
Browse files Browse the repository at this point in the history
  • Loading branch information
dfbag7 committed Feb 11, 2020
1 parent 2437fe2 commit 3bc1625
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions readme.md
Expand Up @@ -18,6 +18,8 @@ composer require league/flysystem-aws-s3-v3

# Bootstrap

Using standard `Aws\S3\S3Client`:

``` php
<?php
use Aws\S3\S3Client;
Expand All @@ -38,3 +40,25 @@ $client = new S3Client([
$adapter = new AwsS3Adapter($client, 'your-bucket-name');
$filesystem = new Filesystem($adapter);
```

or using `Aws\S3\S3MultiRegionClient` which does not require to specify the `region` parameter:

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

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

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

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

0 comments on commit 3bc1625

Please sign in to comment.