Skip to content

talboterie/flysystem-gcp-storage

Repository files navigation

Flysystem GCP Storage

Latest Version on Packagist Software License GitHub Workflow Status Coverage Status Quality Score Total Downloads

Flysystem adapter for Google Cloud Storage.

Install

Via Composer

$ composer require talboterie/flysystem-gcp-storage

Usage

use League\Flysystem\Filesystem;
use Google\Cloud\Storage\StorageClient;
use Talboterie\FlysystemGCPStorage\StorageAdapter;

$client = new StorageClient([
    'projectId' => 'your-gcp-project-id',
    'keyFilePath' => '/path/to/credentials.json',
]);

$adapter = new StorageAdapter($client->bucket('your-bucket'));

$filesystem = new Filesystem($adapter);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email vincent@talbot.ninja instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.