Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from eldor/master
Browse files Browse the repository at this point in the history
Switch to league/flysystem-azure-blob-storage
  • Loading branch information
matthewbdaly authored Sep 11, 2018
2 parents 2747051 + fb3b41a commit f26f8a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"keywords": ["storage","laravel","azure"],
"require": {
"league/flysystem-azure": "^1.0"
"league/flysystem-azure-blob-storage": "^0.1.4"
},
"require-dev": {
"orchestra/testbench": "^3.5",
Expand Down
9 changes: 5 additions & 4 deletions src/AzureStorageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Storage;
use League\Flysystem\Filesystem;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Azure\AzureAdapter;
use MicrosoftAzure\Storage\Common\ServicesBuilder;
use MicrosoftAzure\Storage\Blob\BlobRestProxy;
use League\Flysystem\AzureBlobStorage\AzureBlobStorageAdapter;

/**
* Service provider for Azure Blob Storage
Expand All @@ -26,8 +26,9 @@ public function boot()
$config['name'],
$config['key']
);
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($endpoint);
return new Filesystem(new AzureAdapter($blobRestProxy, "/".$config['container']));
$client = BlobRestProxy::createBlobService($endpoint);
$adapter = new AzureBlobStorageAdapter($client, $config['container']);
return new Filesystem($adapter);
});
}

Expand Down

0 comments on commit f26f8a7

Please sign in to comment.