Skip to content

Commit 3d8ec08

Browse files
authored
Merge pull request #6 from Azure-OSS/add-public-urls
2 parents 2cb737d + aa001dd commit 3d8ec08

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"php": "^8.1",
2424
"illuminate/filesystem": "^10|^11",
2525
"illuminate/support": "^10|^11",
26-
"azure-oss/storage-blob-flysystem": "^1.1"
26+
"azure-oss/storage-blob-flysystem": "^1.2"
2727
},
2828
"require-dev": {
2929
"laravel/pint": "^1.17",

src/AzureStorageBlobAdapter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public function __construct(array $config)
3131
);
3232
}
3333

34+
public function url($path)
35+
{
36+
return $this->adapter->publicUrl($path, new Config);
37+
}
38+
3439
/** @phpstan-ignore-next-line */
3540
public function temporaryUrl($path, $expiration, array $options = [])
3641
{

tests/AzureStorageBlobAdapterTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public function driver_works(): void
7474
'content',
7575
Http::get($driver->temporaryUrl('file.txt', now()->addMinute()))->body()
7676
);
77+
self::assertEquals(
78+
'content',
79+
Http::get($driver->url('file.txt'))->body()
80+
);
7781

7882
$driver->copy('file.txt', 'file2.txt');
7983

0 commit comments

Comments
 (0)