From d538d67e9bb9dbfce72c72363b8d439aedbc7451 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Mon, 24 Jun 2019 19:06:59 +0200 Subject: [PATCH] Azure docs --- docs/configuration/storage.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/configuration/storage.md b/docs/configuration/storage.md index 337cd1f..bcc2c85 100644 --- a/docs/configuration/storage.md +++ b/docs/configuration/storage.md @@ -157,6 +157,31 @@ See official [documentation](https://flysystem.thephpleague.com/docs/adapter/dig ], ``` +## Microsoft Azure Blob Storage +You must require additional library `composer require league/flysystem-azure-blob-storage` + +See official [documentation](https://flysystem.thephpleague.com/docs/adapter/azure/) + +``` + 'Filegator\Services\Storage\Filesystem' => [ + 'handler' => '\Filegator\Services\Storage\Filesystem', + 'config' => [ + 'separator' => '/', + 'config' => [], + 'adapter' => function () { + $accountName = 'your_storage_account_name'; + $accountKey = '123456'; + $containerName = 'my_container'; + + $client = \MicrosoftAzure\Storage\Blob\BlobRestProxy::createBlobService( + "DefaultEndpointsProtocol=https;AccountName=${accountName};AccountKey=${accountKey};" + ); + + return new \League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter($client, $containerName); + }, + ], + ], +``` ## Replicate Adapter You must require additional library `composer require league/flysystem-replicate-adapter`