Skip to content

Commit abbc2f7

Browse files
add quickstart (#10)
1 parent 4053e23 commit abbc2f7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
composer require azure-oss/storage-blob-flysystem
1515
```
1616

17+
## Quickstart
18+
19+
```php
20+
use AzureOss\FlysystemAzureBlobStorage\AzureBlobStorageAdapter;
21+
use AzureOss\Storage\Blob\BlobServiceClient;
22+
use League\Flysystem\Filesystem;
23+
24+
$blobServiceClient = BlobServiceClient::fromConnectionString('<connection-string>');
25+
$containerClient = $blobServiceClient->getContainerClient('quickstart');
26+
27+
$adapter = new AzureBlobStorageAdapter($containerClient, "optional/prefix");
28+
$filesystem = new Filesystem($adapter);
29+
30+
$filesystem->write('hello', 'world!');
31+
```
32+
1733
## Documentation
1834

1935
For more information visit the documentation at [azure-oss.github.io](https://azure-oss.github.io/storage/flysystem/).

0 commit comments

Comments
 (0)