PHPackages                             flaircore/backblaze - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. flaircore/backblaze

ActiveLibrary[File &amp; Storage](/categories/file-storage)

flaircore/backblaze
===================

PHP wrapper around B2 Cloud storage APIs

0.1.1(3y ago)214MITPHPPHP ^7.2.5 || ^8.0

Since Mar 3Pushed 3y agoCompare

[ Source](https://github.com/flaircore/backblaze)[ Packagist](https://packagist.org/packages/flaircore/backblaze)[ RSS](/packages/flaircore-backblaze/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP wrapper around B2 Cloud storage API endpoints.
==================================================

[](#php-wrapper-around-b2-cloud-storage-api-endpoints)

Examples:
=========

[](#examples)

Remember to autoload your composer dependencies if not already loaded:

```
// Autoload dependencies installed via composer .
require_once __DIR__ . '/vendor/autoload.php';
```

### Setup:

[](#setup)

- BackblazeClient takes an array with your bucket configuration details.
-

```
$b2_configs = [
    'B2_REGION' => B2_REGION,
    'B2_API_KEY' => B2_API_KEY,
    'B2_API_SECRET' => B2_API_SECRET,
    'B2_BUCKET_NAME' => B2_BUCKET_NAME,
    'B2_BUCKET_ID' => B2_BUCKET_ID,
    'B2_ENDPOINT' => B2_ENDPOINT
];

$this->b2Client = new BackblazeClient($b2_configs);
```

- Uploading small files.

```
// Steps

// Authorize requests

// Get the upload url + the authorizationToken

// Upload the file (b2_upload_file)

$b2_auth = $this->b2Client->b2AuthorizeAccount();

// Required from b2_auth

$auth_token = $b2_auth->authorizationToken;

$api_url = $b2_auth->apiUrl;

$file_name = '51863901_1591128994364639_5533062884642328214_n.jpg';

$key = 'a-file-folder/'. $file_name;
// Assuming your files are stored in the '/uploads/', change to fit your folders.

$local_file = dirname(__DIR__, 1) . '/uploads/'. $file_name;

$upload_details = $this->b2Client->b2GetUploadUrl($api_url, $auth_token);

$upload_file = $this->b2Client->b2UploadFile($key, $local_file, $upload_details->uploadUrl, $upload_details->authorizationToken);

var_dump($upload_details);

var_dump($upload_file);

die('HERE TOO');
```

- Uploading large files (multipart).

```
// Steps
//
//
//
$b2_auth = $this->b2Client->b2AuthorizeAccount();
// Required from b2_auth
$auth_token = $b2_auth->authorizationToken;
$api_url = $b2_auth->apiUrl;

$file_name = 'BULLET TRAIN - Official Trailer (HD).mp4';
$key = 'a-folder/'. $file_name;
// Assuming your files are stored in the '/uploads/', change to fit your folders.
$local_file = dirname(__DIR__, 1) . '/uploads/'. $file_name;

$start_upload_file = $this->b2Client->b2StartLargeFile($api_url, $auth_token, $key);
$fileId = $start_upload_file->fileId// From here, you can save the values required in b2UploadChunks($local_file, $auth_token, $api_url, $fileId);
// below, and later fire that action via a cron job, to make content editing easier (take less time) maybe.

// upload chunks
$large_upload_res = $this->b2Client->b2UploadChunks($local_file, $auth_token, $api_url, $fileId);
// Delete local file maybe
// unlink( $local_file );
var_dump($large_upload_res);
die('DONE for a large file');
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

1215d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e1a880b9d8bad96075a11e6d17c62430c1c9033398119c8d83e71e37ae69074?d=identicon)[Nicholas Babu](/maintainers/Nicholas%20Babu)

![](https://www.gravatar.com/avatar/3d2d9023762c58b29ce40d9cb2369b117258ee560926b491dd114c310b32150b?d=identicon)[Flaircore](/maintainers/Flaircore)

---

Top Contributors

[![Nickbahson](https://avatars.githubusercontent.com/u/22325357?v=4)](https://github.com/Nickbahson "Nickbahson (2 commits)")

---

Tags

bucketbackblazecloud-storage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flaircore-backblaze/health.svg)

```
[![Health](https://phpackages.com/badges/flaircore-backblaze/health.svg)](https://phpackages.com/packages/flaircore-backblaze)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[google/cloud

Google Cloud Client Library

1.2k16.7M57](/packages/google-cloud)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[gliterd/backblaze-b2

PHP SDK for working with backblaze B2 cloud storage.

83278.7k8](/packages/gliterd-backblaze-b2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
