partner-it / b2-php
There is no license information available for the latest version (dev-master) of this package.
dev-master
2017-12-14 15:29 UTC
Requires
- php: >=5.4.16
- partner-it/php-curl-wrapper: ~1.0
Requires (Dev)
This package is not auto-updated.
Last update: 2026-03-01 02:02:07 UTC
README
Backblaze B2 PHP wrapper
Installation
composer require partner-it/b2-php
Setup
Instantiate a new client and get a token:
$client = new \B2\B2Client('accountid', 'applicationKey'); $client->requestToken();
Upload a file
$client->Files->uploadFile('bucketId', '/my/local/path/image.jpg', 'image.jpg', 'image/jpeg');
Dowload a file
Download a file by name:
$data = $b2Client->Files->downloadFileByName('bucketname', 'image.jpg');