Skip to content

Commit bf6aedd

Browse files
author
brecht.vermeersch
committed
allow setting the permission
1 parent 7fd77e6 commit bf6aedd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/AzureBlobStorageAdapter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,14 @@ public function copy(string $source, string $destination, Config $config): void
277277

278278
public function temporaryUrl(string $path, \DateTimeInterface $expiresAt, Config $config): string
279279
{
280+
$permissions = $config->get("permissions", "r");
281+
if (! is_string($permissions)) {
282+
throw new \InvalidArgumentException("permissions must be a string!");
283+
}
284+
280285
$sasBuilder = BlobSasBuilder::new()
281286
->setExpiresOn($expiresAt)
282-
->setPermissions("r");
287+
->setPermissions($permissions);
283288

284289
$sas = $this->containerClient
285290
->getBlobClient($this->prefixer->prefixPath($path))

0 commit comments

Comments
 (0)