https://github.com/gliterd/flysystem-backblaze
:cd: A backblaze adapter which can be used with flysystem(http://flysystem.thephpleague.com/)
https://github.com/gliterd/flysystem-backblaze
backblaze backblaze-adapter filesystem filesystem-library php thephpleague
Last synced: 5 months ago
JSON representation
:cd: A backblaze adapter which can be used with flysystem(http://flysystem.thephpleague.com/)
- Host: GitHub
- URL: https://github.com/gliterd/flysystem-backblaze
- Owner: gliterd
- License: mit
- Created: 2016-08-26T09:55:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T12:31:48.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T22:12:10.561Z (6 months ago)
- Topics: backblaze, backblaze-adapter, filesystem, filesystem-library, php, thephpleague
- Language: PHP
- Homepage: http://flysystem.thephpleague.com/
- Size: 53.7 KB
- Stars: 62
- Watchers: 4
- Forks: 46
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - gliterd/flysystem-backblaze - :cd: A backblaze adapter which can be used with flysystem(http://flysystem.thephpleague.com/) (PHP)
README
# flysystem-backblaze
[](https://twitter.com/mhetreramesh)
[](https://packagist.org/packages/mhetreramesh/flysystem-backblaze)
[![Software License][ico-license]](LICENSE.md)
[](https://travis-ci.org/gliterd/flysystem-backblaze)
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[](https://packagist.org/packages/mhetreramesh/flysystem-backblaze)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](https://github.com/cwhite92/b2-sdk-php) to communicate with the API.
## Install
Via Composer
``` bash
$ composer require mhetreramesh/flysystem-backblaze
```## Usage
``` php
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](https://www.backblaze.com/b2/docs/quick_command_line.html) `b2 get-bucket `
``` php
$client = new Client($accountId, $applicationKey);
$adapter = new BackblazeAdapter($client, $bucketName, $bucketId);
```## Documentation
Here is the [complete guide](https://flysystem.thephpleague.com/docs/usage/filesystem-api/) of all available options.## Change log
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ composer test
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
## Security
If you discover any security related issues, please email mhetreramesh@gmail.com instead of using the issue tracker.
## Credits
- [Ramesh Mhetre][link-author]
- [All Contributors][link-contributors]## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
[ico-version]: https://img.shields.io/packagist/v/mhetreramesh/flysystem-backblaze.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/gliterd/flysystem-backblaze/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/gliterd/flysystem-backblaze.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/gliterd/flysystem-backblaze.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/mhetreramesh/flysystem-backblaze.svg?style=flat-square[link-packagist]: https://packagist.org/packages/mhetreramesh/flysystem-backblaze
[link-travis]: https://travis-ci.org/gliterd/flysystem-backblaze
[link-scrutinizer]: https://scrutinizer-ci.com/g/gliterd/flysystem-backblaze/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/gliterd/flysystem-backblaze
[link-downloads]: https://packagist.org/packages/mhetreramesh/flysystem-backblaze
[link-author]: https://github.com/mhetreramesh
[link-contributors]: ../../contributors