marcandreappel / flysystem-backblaze
Backblaze adapter for the flysystem filesystem abstraction library
Installs: 18 233
Dependents: 2
Suggesters: 1
Security: 0
Stars: 1
Watchers: 1
Forks: 46
Open Issues: 1
Requires
- php: ^8.0|^8.1
- gliterd/backblaze-b2: >=1.5
- league/flysystem: ^3.0
- mikey179/vfsstream: *
- psr/http-message-implementation: *
Requires (Dev)
- orchestra/testbench: ^v7.3
This package is auto-updated.
Last update: 2024-11-30 02:03:08 UTC
README
Description
This Backblaze adapter makes it possible to use the Flysystem filesystem abstraction library with Backblaze.
It uses the Backblaze B2 SDK to communicate with the API.
Installation
Install the package with Composer:
composer require marcandreappel/flysystem-backblaze
For legacy systems (league/flysystem < v3.0):
composer require marcandreappel/flysystem-backblaze:^1.8
Usage
use MarcAndreAppel\FlysystemBackblaze\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
Visit your Backblaze B2 dashboard to get your account id and application key.
If you specify only the $bucketName
when creating the BackblazeAdapter, your $applicationKey
must be the master key.
However, if you specify both bucket name and bucket id, you can use an application key.
Fetch your $bucketId
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 Flysystem guide with all available options.
For legacy systems, consult the documentation for version 1.
Security
If you discover any security related issues, please open a ticket on the issue tracker.
Credits
License
The MIT License (MIT). Please read the license file for more information.