Skip to content

Commit b9d8135

Browse files
committed
Add conditional providesTemporaryUrls() method
Generating temporary URLs only works if sharedKeyCredentials are set.
1 parent 6513a97 commit b9d8135

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AzureStorageBlobAdapter.php

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

55
use AzureOss\FlysystemAzureBlobStorage\AzureBlobStorageAdapter;
66
use AzureOss\Storage\Blob\BlobServiceClient;
7+
use AzureOss\Storage\Common\Auth\StorageSharedKeyCredential;
78
use Illuminate\Filesystem\FilesystemAdapter;
89
use League\Flysystem\Config;
910
use League\Flysystem\Filesystem;
@@ -43,7 +44,7 @@ public function url($path)
4344
*/
4445
public function providesTemporaryUrls()
4546
{
46-
return true;
47+
return $this->adapter->containerClient->sharedKeyCredentials instanceof StorageSharedKeyCredential;
4748
}
4849

4950
/**

0 commit comments

Comments
 (0)