Skip to content

Commit b76115c

Browse files
committed
Simplify check for ability to generate temporary URLs
1 parent a399639 commit b76115c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/AzureStorageBlobAdapter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use AzureOss\FlysystemAzureBlobStorage\AzureBlobStorageAdapter;
66
use AzureOss\Storage\Blob\BlobServiceClient;
7-
use AzureOss\Storage\Common\Auth\StorageSharedKeyCredential;
87
use Illuminate\Filesystem\FilesystemAdapter;
98
use League\Flysystem\Config;
109
use League\Flysystem\Filesystem;
@@ -29,7 +28,7 @@ public function __construct(array $config)
2928
{
3029
$serviceClient = BlobServiceClient::fromConnectionString($config['connection_string']);
3130
$containerClient = $serviceClient->getContainerClient($config['container']);
32-
$this->canProvideTemporaryUrls = $containerClient->sharedKeyCredentials instanceof StorageSharedKeyCredential;
31+
$this->canProvideTemporaryUrls = $containerClient->canGenerateSasUri();
3332
$adapter = new AzureBlobStorageAdapter($containerClient, $config['prefix'] ?? $config['root'] ?? '');
3433

3534
parent::__construct(

0 commit comments

Comments
 (0)