diff --git a/.env b/.env index 1b35cca89..f250c3b1f 100644 --- a/.env +++ b/.env @@ -32,6 +32,10 @@ _APP_STORAGE_DO_SPACES_ACCESS_KEY= _APP_STORAGE_DO_SPACES_SECRET= _APP_STORAGE_DO_SPACES_REGION=us-eas-1 _APP_STORAGE_DO_SPACES_BUCKET= +_APP_STORAGE_BACKBLAZE_ACCESS_KEY= +_APP_STORAGE_BACKBLAZE_SECRET= +_APP_STORAGE_BACKBLAZE_REGION=us-eas-1 +_APP_STORAGE_BACKBLAZE_BUCKET= _APP_STORAGE_ANTIVIRUS=disabled _APP_STORAGE_ANTIVIRUS_HOST=clamav _APP_STORAGE_ANTIVIRUS_PORT=3310 diff --git a/app/config/variables.php b/app/config/variables.php index 0326b9790..6b926a25e 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -512,7 +512,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_ACCESS_KEY', - 'description' => 'Backblaze access key. Required when the storage adapter is set to BackBlaze. Your Backblaze keyID will be your access key. You can get your keyID from your Backblaze console.', + 'description' => 'Backblaze access key. Required when the storage adapter is set to Backblaze. Your Backblaze keyID will be your access key. You can get your keyID from your Backblaze console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -520,7 +520,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_SECRET', - 'description' => 'Backblaze secret key. Required when the storage adapter is set to BackBlaze. Your Backblaze applicationKey will be your secret key. You can get your applicationKey from your Backblaze console.', + 'description' => 'Backblaze secret key. Required when the storage adapter is set to Backblaze. Your Backblaze applicationKey will be your secret key. You can get your applicationKey from your Backblaze console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, @@ -528,7 +528,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_REGION', - 'description' => 'Backblaze region. Required when storage adapter is set to BackBlaze. You can find your region info from your Backblaze console.', + 'description' => 'Backblaze region. Required when storage adapter is set to Backblaze. You can find your region info from your Backblaze console.', 'introduction' => '0.13.0', 'default' => 'us-west-004', 'required' => false, @@ -536,7 +536,7 @@ return [ ], [ 'name' => '_APP_STORAGE_BACKBLAZE_BUCKET', - 'description' => 'Backblaze bucket. Required when storage adapter is set to BackBlaze. You can create your bucket from your Backblaze console.', + 'description' => 'Backblaze bucket. Required when storage adapter is set to Backblaze. You can create your bucket from your Backblaze console.', 'introduction' => '0.13.0', 'default' => '', 'required' => false, diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index c5c6da616..218a2e339 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -8,6 +8,7 @@ use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit; use Utopia\Database\Document; use Utopia\Storage\Device\DOSpaces; +use Utopia\Storage\Device\Backblaze; use Utopia\Database\Validator\Authorization; use Utopia\Storage\Device\Local; use Utopia\Storage\Device\S3; diff --git a/app/executor.php b/app/executor.php index 1fd09c1ff..3d827f0a2 100644 --- a/app/executor.php +++ b/app/executor.php @@ -17,7 +17,7 @@ use Utopia\Orchestration\Adapter\DockerCLI; use Utopia\Orchestration\Orchestration; use Utopia\Storage\Device; use Utopia\Storage\Device\Local; -use Utopia\Storage\Device\BackBlaze; +use Utopia\Storage\Device\Backblaze; use Utopia\Storage\Device\DOSpaces; use Utopia\Storage\Device\S3; use Utopia\Storage\Storage; @@ -137,7 +137,7 @@ function getStorageDevice($root): Device { $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); $backblazeAcl = 'private'; - return new BackBlaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); } } diff --git a/app/init.php b/app/init.php index 259eae7bb..a87f3ee3f 100644 --- a/app/init.php +++ b/app/init.php @@ -53,7 +53,7 @@ use Utopia\Database\Query; use Utopia\Storage\Device; use Utopia\Storage\Storage; use Utopia\Storage\Device\Local; -use Utopia\Storage\Device\BackBlaze; +use Utopia\Storage\Device\Backblaze; use Utopia\Storage\Device\S3; use Utopia\Storage\Device\DOSpaces; @@ -842,7 +842,7 @@ function getDevice($root): Device { $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); $backblazeAcl = 'private'; - return new BackBlaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); } } diff --git a/app/workers/deletes.php b/app/workers/deletes.php index fe383036c..441aebf72 100644 --- a/app/workers/deletes.php +++ b/app/workers/deletes.php @@ -10,7 +10,7 @@ use Executor\Executor; use Utopia\Storage\Device\Local; use Utopia\Storage\Device\S3; use Utopia\Storage\Device\DOSpaces; -use Utopia\Storage\Device\BackBlaze; +use Utopia\Storage\Device\Backblaze; use Utopia\Storage\Storage; use Utopia\Abuse\Abuse; use Utopia\Abuse\Adapters\TimeLimit; @@ -570,7 +570,7 @@ class DeletesV1 extends Worker $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); $backblazeAcl = 'private'; - $device= new BackBlaze(APP_STORAGE_UPLOADS . '/app-' . $projectId, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + $device= new Backblaze(APP_STORAGE_UPLOADS . '/app-' . $projectId, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); break; } diff --git a/src/Appwrite/Resque/Worker.php b/src/Appwrite/Resque/Worker.php index 531d1a800..34a37dbc5 100644 --- a/src/Appwrite/Resque/Worker.php +++ b/src/Appwrite/Resque/Worker.php @@ -12,7 +12,7 @@ use Utopia\Storage\Device; use Utopia\Storage\Storage; use Utopia\Storage\Device\Local; use Utopia\Storage\Device\DOSpaces; -use Utopia\Storage\Device\BackBlaze; +use Utopia\Storage\Device\Backblaze; use Utopia\Storage\Device\S3; use Exception; @@ -285,7 +285,7 @@ abstract class Worker $backblazeRegion = App::getEnv('_APP_STORAGE_BACKBLAZE_REGION', ''); $backblazeBucket = App::getEnv('_APP_STORAGE_BACKBLAZE_BUCKET', ''); $backblazeAcl = 'private'; - return new BackBlaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); + return new Backblaze($root, $backblazeAccessKey, $backblazeSecretKey, $backblazeBucket, $backblazeRegion, $backblazeAcl); } } }