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

This package is not auto-updated.

Last update: 2024-04-13 15:56:07 UTC


README

Codeship Status for partner-it/b2-php Scrutinizer Code Quality Code Coverage

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');