azure-oss / storage-blob-flysystem
Flysystem adapter for Azure Storage PHP
Installs: 345 412
Dependents: 6
Suggesters: 1
Security: 0
Stars: 20
Watchers: 3
Forks: 5
Open Issues: 5
pkg:composer/azure-oss/storage-blob-flysystem
Requires
- php: ^8.1
- azure-oss/storage: ^1.2
- league/flysystem: ^3.28
Requires (Dev)
- laravel/pint: ^1.16
- league/flysystem-adapter-test-utilities: ^3.28
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^10.5
- rector/rector: ^1.2
This package is auto-updated.
Last update: 2025-10-03 16:26:40 UTC
README
Warning
Data Lake Storage (Storage Account with hierarchical namespace enabled) is unsupported.
Minimum Requirements
- PHP 8.1 or above
- Required PHP extensions
- curl
- json
- xml
Install
composer require azure-oss/storage-blob-flysystem
Usage
use AzureOss\FlysystemAzureBlobStorage\AzureBlobStorageAdapter; use AzureOss\Storage\Blob\BlobServiceClient; use League\Flysystem\Filesystem; // Create a BlobContainerClient $containerClient = BlobServiceClient::fromConnectionString($connectionString) ->getContainerClient('your-container-name'); // Create the adapter $adapter = new AzureBlobStorageAdapter( $containerClient, 'optional-prefix', useDirectPublicUrl: false, // Set to true to use direct public URLs instead of SAS tokens ); // Create the filesystem $filesystem = new Filesystem($adapter);
Public URLs
By default, the adapter generates public URLs using SAS tokens with a 1000-year expiration. If you prefer to use direct public URLs without SAS tokens, you can set the useDirectPublicUrl
parameter to true
:
$adapter = new AzureBlobStorageAdapter( $containerClient, 'optional-prefix', useDirectPublicUrl: true, );
Note that for direct public URLs to work, your container must be configured with public access. If your container is private, you should use the default SAS token approach.
Documentation
For more information visit the documentation at azure-oss.github.io.
Support
Do you need help, do you want to talk to us, or is there anything else?
Join us at:
License
Azure-Storage-PHP-Adapter-Flysystem is released under the MIT License. See LICENSE for details.
PHP Version Support Policy
The maintainers of this package add support for a PHP version following its initial release and drop support for a PHP version once it has reached its end of security support.
Backward compatibility promise
Azure-Storage-PHP is using Semver. This means that versions are tagged with MAJOR.MINOR.PATCH. Only a new major version will be allowed to break backward compatibility (BC).
Classes marked as @experimental or @internal are not included in our backward compatibility promise. You are also not guaranteed that the value returned from a method is always the same. You are guaranteed that the data type will not change.
PHP 8 introduced named arguments, which increased the cost and reduces flexibility for package maintainers. The names of the arguments for methods in the library are not included in our BC promise.