PHP code example of baywa-re-lusy / file-storage

1. Go to this page and download the library: Download baywa-re-lusy/file-storage library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

baywa-re-lusy / file-storage example snippets


use BayWaReLusy\FileStorage\FileStorageService;
use BayWaReLusy\FileStorage\Adapter\AzureBlobAdapter;

$adapter            = new AzureBlobAdapter('<storage-account-name>', '<container name>', '<shared-access-signature>');
$fileStorageService = new FileStorageService($adapter);

use BayWaReLusy\FileStorage\FileStorageService;
use BayWaReLusy\FileStorage\Adapter\LocalAdapter;

$adapter            = new LocalAdapter('/var/www/html/public/remote', 'https://my-api.api-url.com');
$fileStorageService = new FileStorageService($adapter);