mhetreramesh / flysystem-backblaze
Backblaze adapter for the flysystem filesystem abstraction library
Installs: 137 715
Dependents: 12
Suggesters: 5
Security: 0
Stars: 62
Watchers: 4
Forks: 46
Open Issues: 6
Requires
- php: ^7.2
- gliterd/backblaze-b2: >=1.5.0
- league/flysystem: ~1.0
- mikey179/vfsstream: *
- psr/http-message-implementation: *
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
README
Visit (https://secure.backblaze.com/b2_buckets.htm) and get your account id, application key.
The Backblaze adapter gives the possibility to use the Flysystem filesystem abstraction library with backblaze. It uses the Backblaze B2 SDK to communicate with the API.
Install
Via Composer
$ composer require mhetreramesh/flysystem-backblaze
Usage
use Mhetreramesh\Flysystem\BackblazeAdapter; use League\Flysystem\Filesystem; use BackblazeB2\Client; $client = new Client($accountId, $applicationKey); $adapter = new BackblazeAdapter($client,$bucketName); $filesystem = new Filesystem($adapter);
Using ApplicationKey instead of MasterKey
If you specify only the $bucketName when creating the BackblazeAdapter, your application key must be the master key.
However, if you specify both bucket name and bucket id, you do not need the master key and can use a single-bucket key.
Fetch your bucket id using the b2 command line tool b2 get-bucket <bucketName>
$client = new Client($accountId, $applicationKey); $adapter = new BackblazeAdapter($client, $bucketName, $bucketId);
Documentation
Here is the complete guide of all available options.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email mhetreramesh@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.