From 56a9d60d5eaa191db5bed5cf663c78b4a5cdb3a0 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Mon, 24 Jun 2019 15:55:17 +0200 Subject: [PATCH] Amazon S3 adapter doc --- docs/configuration/storage.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/configuration/storage.md b/docs/configuration/storage.md index b8722fa..e4904d8 100644 --- a/docs/configuration/storage.md +++ b/docs/configuration/storage.md @@ -98,3 +98,31 @@ See official [documentation](https://flysystem.thephpleague.com/docs/adapter/dro ], ``` + +## Amazon S3 Adapter (v3) +You must require additional library `composer require league/flysystem-aws-s3-v3` + +See official [documentation](https://flysystem.thephpleague.com/docs/adapter/aws-s3/) + +``` + 'Filegator\Services\Storage\Filesystem' => [ + 'handler' => '\Filegator\Services\Storage\Filesystem', + 'config' => [ + 'separator' => '/', + 'config' => [], + 'adapter' => function () { + $client = new \Aws\S3\S3Client([ + 'credentials' => [ + 'key' => '123456', + 'secret' => 'secret123456', + ], + 'region' => 'us-east-1', + 'version' => 'latest', + ]); + + return new \League\Flysystem\AwsS3v3\AwsS3Adapter($client, 'my-bucket-name'); + }, + ], + ], + +```