Skip to content
Permalink
Browse files

Added Google Cloud Storage support

  • Loading branch information...
fredrikkarlsson-pervanovo committed Jun 20, 2019
1 parent 2dd7d6f commit 639f0e7463b53d24837ad4ab8f54c110df59db4a
Showing 374 changed files with 50,138 additions and 1 deletion.
@@ -116,6 +116,31 @@
'url' => $image_address
];
break;
case 'gcp_storage':
if (!isset($settings['bucket'])) {
break;
}
$client = new Google\Cloud\Storage\StorageClient();
$bucket = $client->bucket($settings['bucket']);
$prefix = $settings['prefix'] ?: $key;
$url = $settings['url'] ?? 'https://storage.googleapis.com/'.$settings['bucket'];
if (!isset($settings['url']) && $prefix) {
$url .= "/{$prefix}";
}
$storages[$key] = [
'adapter' => 'Superbalist\Flysystem\GoogleStorage\GoogleStorageAdapter',
'args' => [$client, $bucket, $prefix],
'mount' => true,
'url' => $url
];
break;
}
@@ -1,7 +1,8 @@
{
"require": {
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-azure-blob-storage": "^0.1.5"
"league/flysystem-azure-blob-storage": "^0.1.5",
"superbalist/flysystem-google-storage": "^7.2.1"
},

"config": {
@@ -0,0 +1,5 @@
XSym
0043
64ad2e10de25ad636c2985d2b3f581f1
../google/cloud-core/bin/google-cloud-batch

Large diffs are not rendered by default.

@@ -6,4 +6,5 @@
$baseDir = dirname($vendorDir);
return array(
'Rize\\UriTemplate' => array($vendorDir . '/rize/uri-template/src'),
);
@@ -6,7 +6,11 @@
$baseDir = dirname($vendorDir);
return array(
'Superbalist\\Flysystem\\GoogleStorage\\' => array($vendorDir . '/superbalist/flysystem-google-storage/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'MicrosoftAzure\\Storage\\Common\\' => array($vendorDir . '/microsoft/azure-storage-common/src/Common'),
'MicrosoftAzure\\Storage\\Blob\\' => array($vendorDir . '/microsoft/azure-storage-blob/src/Blob'),
'League\\Flysystem\\AzureBlobStorage\\' => array($vendorDir . '/league/flysystem-azure-blob-storage/src'),
@@ -16,5 +20,9 @@
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
'Google\\Cloud\\Storage\\' => array($vendorDir . '/google/cloud-storage/src'),
'Google\\Cloud\\Core\\' => array($vendorDir . '/google/cloud-core/src'),
'Google\\Auth\\' => array($vendorDir . '/google/auth/src'),
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
'Aws\\' => array($vendorDir . '/aws/aws-sdk-php/src'),
);

Large diffs are not rendered by default.

0 comments on commit 639f0e7

Please sign in to comment.
You can’t perform that action at this time.