azure-oss / storage-file-share
Azure Storage File Share PHP SDK
Package info
github.com/php-oss-for-azure/azure-storage-file-share-php
pkg:composer/azure-oss/storage-file-share
Requires
- php: ^8.2
- ext-curl: *
- ext-json: *
- ext-simplexml: *
- azure-oss/storage-common: ^2.0
- guzzlehttp/guzzle: ^7.8 || ^8.0
README
A PHP SDK for Azure Files service operations and SAS generation.
Important
This package is community-maintained and is not affiliated with, endorsed by, or supported by Microsoft.
Install
composer require azure-oss/storage-file-share
Documentation
Read the File Share docs at php-oss-for-azure.github.io/storage-file-share/core.
Migration Guide
Migrating from microsoft/azure-storage-file?
Migrate from microsoft/azure-storage-file.
Quickstart
<?php use AzureOss\Storage\File\Share\Sas\ShareFileSasPermissions; use AzureOss\Storage\File\Share\Sas\ShareSasBuilder; use AzureOss\Storage\File\Share\ShareServiceClient; $service = ShareServiceClient::fromConnectionString( getenv('AZURE_STORAGE_CONNECTION_STRING') ); $file = $service ->getShareClient('documents') ->getDirectoryClient('reports') ->getFileClient('summary.txt'); $sasUri = $file->generateSasUri( ShareSasBuilder::new() ->setPermissions(new ShareFileSasPermissions(read: true)) ->setExpiresOn(new DateTimeImmutable('+15 minutes')), ); echo $sasUri.PHP_EOL;
Related packages
- azure-oss/storage — Meta package for the Storage SDKs
- azure-oss/storage-common — Shared authentication, HTTP, and SAS primitives
- azure-oss/storage-blob — Blob Storage SDK
- azure-oss/storage-blob-flysystem — Flysystem adapter
- azure-oss/storage-blob-flysystem-bundle — Symfony Flysystem bundle
- azure-oss/storage-blob-laravel — Laravel filesystem driver
- azure-oss/storage-queue — Queue Storage SDK
- azure-oss/storage-queue-laravel — Laravel queue connector
- azure-oss/identity — Microsoft Entra ID token authentication
Maintenance
This package is part of the community-maintained PHP OSS for Azure project. It is an independent project and is not affiliated with or endorsed by Microsoft.
License
This project is released under the MIT License. See LICENSE for details.