Skip to content

Conversation

@dlangenk
Copy link
Member

@mzur It works using the azurite emulator and the URLs provided by Rob Skelly (I'll forward you the mail). Could you please have a look, especially at the tests since I don't have any idea how the whole thing in PHP works.

Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use azure-oss/storage-blob-laravel instead of adding a custom implementation of the filesystem adapter here. This has to be added as a requirement to composer.json. The current state is missing league/flysystem-azure-blob-storage that is used here but this package is abandoned in favor of the azure-oss stuff.

@dlangenk dlangenk requested a review from mzur November 28, 2025 09:27
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see the StorageAdapter and FilesystemAdapter in there. This is no longer required if you use azure-oss/storage-blob-laravel, as everything is provided by the package. Also the requirements are still not defined in composer.json.

@mzur mzur changed the title Azure sa s storage disk Azure Blob Storage support Dec 2, 2025
@mzur
Copy link
Member

mzur commented Dec 2, 2025

I sent a PR to the adapter repo and also asked for a new release that exposes the temporary URL support.

@mzur
Copy link
Member

mzur commented Dec 5, 2025

If users can't provide account credentials to generate SASes for temporary URLs on the fly, the adapter could fall back to the static SAS that the user has to update periodically by hand. Here is a possible implementation in AzureStorageBlobAdapter as diff:

9a10
> use League\Flysystem\UnableToGenerateTemporaryUrl;
25c26
<         $adapter = new AzureBlobStorageAdapter($containerClient, $config['prefix'] ?? $config['root'] ?? '');
---
>         $adapter = new AzureBlobStorageAdapter($containerClient, $config['prefix'] ?? $config['root'] ?? '', useDirectPublicUrl: true);
38a40,44
>     public function providesTemporaryUrls()
>     {
>         return true;
>     }
> 
49,53c55,63
<         return $this->adapter->temporaryUrl(
<             $path,
<             $expiration,
<             new Config(array_merge(['permissions' => 'r'], $options))
<         );
---
>         try {
>             return $this->adapter->temporaryUrl(
>                 $path,
>                 $expiration,
>                 new Config(array_merge(['permissions' => 'r'], $options))
>             );
>         } catch (UnableToGenerateTemporaryUrl $e) {
>             return $this->url($path);
>         }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants