samicrusader/flysystem-backblaze

Connects Backblaze B2 object storage to Flysystem

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

pkg:composer/samicrusader/flysystem-backblaze

dev-master 2025-09-11 22:42 UTC

This package is not auto-updated.

Last update: 2025-09-23 09:04:50 UTC


README

Software License

Connects Backblaze B2 object storage to Flysystem v1.0; forked from gliterd/mhetreramesh for use with XenForo because Backblaze's S3 implementation is AIDS.

This fork/rewrite uses obregonco/backblaze-b2 since it supports B2 API version 2 and also was updated in the last year.

$ composer require samicrusader/flysystem-backblaze

XF install instructions coming soon

Usage

You will need:

  • $accountId -> Master Application Key keyID
  • $keyId -> keyID (if you are using the master application key which you shouldn't be, you can omit this)
  • $applicationKey => applicationKey

You can find these on the https://secure.backblaze.com/app_keys.htm page.

use Samicrusader\Flysystem\BackblazeClient;
use Samicrusader\Flysystem\BackblazeAdapter;
use League\Flysystem\Filesystem;

$client = new BackblazeClient(
    accountId: 'xxxxxxxxxxxx', 
    authorizationValues: [
        'keyId' => 'xxxxxxxxxxxxxxxxxxxxxxxxx', /* optional if using master account key */
        'applicationKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    ]
);
$client->version = 2; // client defaults to v1 for some reason

$adapter = new BackblazeAdapter($client, $bucketName);
$filesystem = new Filesystem($adapter);