ameliaikeda / backblaze by amelia

Backblaze laravel storage adapter
856
5
2
Package Data
Maintainer Username: amelia
Maintainer Contact: amelia@dorks.io (Amelia Ikeda)
Package Create Date: 2017-03-27
Package Last Update: 2018-03-08
Language: PHP
License: BSD-3-Clause
Last Refreshed: 2024-12-26 03:00:05
Package Statistics
Total Downloads: 856
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 5
Total Watchers: 2
Total Forks: 3
Total Open Issues: 1

Backblaze Laravel Adapter

Setup:

composer require amelia/backblaze

Register Amelia\Backblaze\BackblazeServiceProvider::class, then add a config array in filesystems.php.

'b2' => [
    'driver' => 'b2',
    'key' => env('BACKBLAZE_KEY'),
    'host' => env('BACKBLAZE_HOST'),
    'bucket' => env('BACKBLAZE_BUCKET'),
    'account' => env('BACKBLAZE_ACCOUNT'),
],

host can be set if you want to link directly to files in buckets marked allPublic.

See this handy guide for setting up cloudflare page rules to turn your bucket into a CDN.

Features

  • Caches the auth token, meaning you don't constantly hit the auth endpoint.
  • Refreshes the auth token for long-running processes (like queue:work).