Merge branch 'feat-db-pools' of github.com:appwrite/appwrite into feat-add-console
This commit is contained in:
commit
71bb70dec4
9 changed files with 48 additions and 65 deletions
2
.env
2
.env
|
@ -29,7 +29,7 @@ _APP_CONNECTIONS_DB_CONSOLE=db_fra1_01=mariadb://user:password@mariadb:3306/appw
|
||||||
_APP_CONNECTIONS_CACHE=redis_fra1_01=redis://redis:6379
|
_APP_CONNECTIONS_CACHE=redis_fra1_01=redis://redis:6379
|
||||||
_APP_CONNECTIONS_QUEUE=redis_fra1_01=redis://redis:6379
|
_APP_CONNECTIONS_QUEUE=redis_fra1_01=redis://redis:6379
|
||||||
_APP_CONNECTIONS_PUBSUB=redis_fra1_01=redis://redis:6379
|
_APP_CONNECTIONS_PUBSUB=redis_fra1_01=redis://redis:6379
|
||||||
_APP_CONNECTIONS_STORAGE=file://localhost
|
_APP_CONNECTIONS_STORAGE=local://localhost
|
||||||
_APP_STORAGE_ANTIVIRUS=disabled
|
_APP_STORAGE_ANTIVIRUS=disabled
|
||||||
_APP_STORAGE_ANTIVIRUS_HOST=clamav
|
_APP_STORAGE_ANTIVIRUS_HOST=clamav
|
||||||
_APP_STORAGE_ANTIVIRUS_PORT=3310
|
_APP_STORAGE_ANTIVIRUS_PORT=3310
|
||||||
|
|
|
@ -509,7 +509,7 @@ return [
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => '_APP_CONNECTIONS_STORAGE',
|
'name' => '_APP_CONNECTIONS_STORAGE',
|
||||||
'description' => 'A DSN representing the storage device to connect to. The DSN takes the following format <device>://<access_key>:<access_secret>@<host>:<port>/<bucket>?region=<region>. For example, for S3: \'s3://access_key:access_secret@host:port/bucket?region=us-east-1\'. To use the local filesystem, you can leave this variable empty. Available devices are file, s3, dospaces, linode, backblaze and wasabi.',
|
'description' => 'A DSN representing the storage device to connect to. The DSN takes the following format <device>://<access_key>:<access_secret>@<host>:<port>/<bucket>?region=<region>. For example, for S3: \'s3://access_key:access_secret@host:port/bucket?region=us-east-1\'. To use the local filesystem, you can leave this variable empty. Available devices are local, s3, dospaces, linode, backblaze and wasabi.',
|
||||||
'introduction' => '1.1.0',
|
'introduction' => '1.1.0',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
|
|
@ -41,6 +41,7 @@ use Utopia\Validator\HexColor;
|
||||||
use Utopia\Validator\Range;
|
use Utopia\Validator\Range;
|
||||||
use Utopia\Validator\Text;
|
use Utopia\Validator\Text;
|
||||||
use Utopia\Validator\WhiteList;
|
use Utopia\Validator\WhiteList;
|
||||||
|
use Utopia\DSN\DSN;
|
||||||
use Utopia\Swoole\Request;
|
use Utopia\Swoole\Request;
|
||||||
|
|
||||||
App::post('/v1/storage/buckets')
|
App::post('/v1/storage/buckets')
|
||||||
|
@ -494,16 +495,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($chunksUploaded === $chunks) {
|
if ($chunksUploaded === $chunks) {
|
||||||
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); /** @TODO : move this to the registry or someplace else */
|
if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled' && $bucket->getAttribute('antivirus', true) && $fileSize <= APP_LIMIT_ANTIVIRUS && $deviceFiles->getType() === Storage::DEVICE_LOCAL) {
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
|
||||||
try {
|
|
||||||
$dsn = new DSN($connection);
|
|
||||||
$device = $dsn->getScheme();
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (App::getEnv('_APP_STORAGE_ANTIVIRUS') === 'enabled' && $bucket->getAttribute('antivirus', true) && $fileSize <= APP_LIMIT_ANTIVIRUS && $device === STORAGE_DEVICE_LOCAL) {
|
|
||||||
$antivirus = new Network(
|
$antivirus = new Network(
|
||||||
App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'),
|
App::getEnv('_APP_STORAGE_ANTIVIRUS_HOST', 'clamav'),
|
||||||
(int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)
|
(int) App::getEnv('_APP_STORAGE_ANTIVIRUS_PORT', 3310)
|
||||||
|
|
26
app/init.php
26
app/init.php
|
@ -75,6 +75,7 @@ use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use Swoole\Database\PDOProxy;
|
use Swoole\Database\PDOProxy;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Queue;
|
use Utopia\Queue;
|
||||||
|
use Utopia\Storage\Storage;
|
||||||
|
|
||||||
const APP_NAME = 'Appwrite';
|
const APP_NAME = 'Appwrite';
|
||||||
const APP_DOMAIN = 'appwrite.io';
|
const APP_DOMAIN = 'appwrite.io';
|
||||||
|
@ -159,13 +160,6 @@ const DELETE_TYPE_SCHEDULES = 'schedules';
|
||||||
const COMPRESSION_TYPE_NONE = 'none';
|
const COMPRESSION_TYPE_NONE = 'none';
|
||||||
const COMPRESSION_TYPE_GZIP = 'gzip';
|
const COMPRESSION_TYPE_GZIP = 'gzip';
|
||||||
const COMPRESSION_TYPE_ZSTD = 'zstd';
|
const COMPRESSION_TYPE_ZSTD = 'zstd';
|
||||||
// Storage Device Types
|
|
||||||
const STORAGE_DEVICE_LOCAL = 'file';
|
|
||||||
const STORAGE_DEVICE_S3 = 's3';
|
|
||||||
const STORAGE_DEVICE_DO_SPACES = 'dospaces';
|
|
||||||
const STORAGE_DEVICE_BACKBLAZE = 'backblaze';
|
|
||||||
const STORAGE_DEVICE_LINODE = 'linode';
|
|
||||||
const STORAGE_DEVICE_WASABI = 'wasabi';
|
|
||||||
// Mail Types
|
// Mail Types
|
||||||
const MAIL_TYPE_VERIFICATION = 'verification';
|
const MAIL_TYPE_VERIFICATION = 'verification';
|
||||||
const MAIL_TYPE_MAGIC_SESSION = 'magicSession';
|
const MAIL_TYPE_MAGIC_SESSION = 'magicSession';
|
||||||
|
@ -1030,6 +1024,7 @@ App::setResource('console', function () {
|
||||||
'legalAddress' => '',
|
'legalAddress' => '',
|
||||||
'legalTaxId' => '',
|
'legalTaxId' => '',
|
||||||
'auths' => [
|
'auths' => [
|
||||||
|
'invites' => false,
|
||||||
'limit' => (App::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user
|
'limit' => (App::getEnv('_APP_CONSOLE_WHITELIST_ROOT', 'enabled') === 'enabled') ? 1 : 0, // limit signup to 1 user
|
||||||
'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds
|
'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, // 1 Year in seconds
|
||||||
],
|
],
|
||||||
|
@ -1105,7 +1100,7 @@ function getDevice($root): Device
|
||||||
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', '');
|
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', '');
|
||||||
|
|
||||||
$acl = 'private';
|
$acl = 'private';
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
$device = Storage::DEVICE_LOCAL;
|
||||||
$accessKey = '';
|
$accessKey = '';
|
||||||
$accessSecret = '';
|
$accessSecret = '';
|
||||||
$bucket = '';
|
$bucket = '';
|
||||||
|
@ -1119,22 +1114,21 @@ function getDevice($root): Device
|
||||||
$bucket = $dsn->getPath();
|
$bucket = $dsn->getPath();
|
||||||
$region = $dsn->getParam('region');
|
$region = $dsn->getParam('region');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local storage.');
|
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.');
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($device) {
|
switch ($device) {
|
||||||
case STORAGE_DEVICE_S3:
|
case Storage::DEVICE_S3:
|
||||||
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_DO_SPACES:
|
case STORAGE::DEVICE_DO_SPACES:
|
||||||
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_BACKBLAZE:
|
case Storage::DEVICE_BACKBLAZE:
|
||||||
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_LINODE:
|
case Storage::DEVICE_LINODE:
|
||||||
return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_WASABI:
|
case Storage::DEVICE_WASABI:
|
||||||
return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_LOCAL:
|
case Storage::DEVICE_LOCAL:
|
||||||
default:
|
default:
|
||||||
return new Local($root);
|
return new Local($root);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,11 @@ use Utopia\Database\DateTime;
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Database\ID;
|
use Utopia\Database\ID;
|
||||||
use Utopia\Storage\Storage;
|
use Utopia\DSN\DSN;
|
||||||
use Utopia\Database\Document;
|
use Utopia\Database\Document;
|
||||||
use Utopia\Config\Config;
|
use Utopia\Config\Config;
|
||||||
use Utopia\Database\Validator\Authorization;
|
use Utopia\Database\Validator\Authorization;
|
||||||
|
use Utopia\Storage\Storage;
|
||||||
|
|
||||||
require_once __DIR__ . '/../init.php';
|
require_once __DIR__ . '/../init.php';
|
||||||
|
|
||||||
|
@ -80,12 +81,12 @@ class BuildsV1 extends Worker
|
||||||
}
|
}
|
||||||
|
|
||||||
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); /** @TODO : move this to the registry or someplace else */
|
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', ''); /** @TODO : move this to the registry or someplace else */
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
$device = Storage::DEVICE_LOCAL;
|
||||||
try {
|
try {
|
||||||
$dsn = new DSN($connection);
|
$dsn = new DSN($connection);
|
||||||
$device = $dsn->getScheme();
|
$device = $dsn->getScheme();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$buildId = $deployment->getAttribute('buildId', '');
|
$buildId = $deployment->getAttribute('buildId', '');
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Appwrite\DSN\DSN;
|
use Appwrite\SMS\Adapter\Mock;
|
||||||
|
use Appwrite\SMS\Adapter\Telesign;
|
||||||
|
use Appwrite\SMS\Adapter\TextMagic;
|
||||||
|
use Appwrite\SMS\Adapter\Twilio;
|
||||||
|
use Appwrite\SMS\Adapter\Msg91;
|
||||||
|
use Appwrite\SMS\Adapter\Vonage;
|
||||||
|
use Utopia\DSN\DSN;
|
||||||
use Appwrite\Resque\Worker;
|
use Appwrite\Resque\Worker;
|
||||||
|
use Appwrite\SMS\Adapter;
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Messaging\Adapter;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\Mock;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\Msg91;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\Telesign;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\TextMagic;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\Twilio;
|
|
||||||
use Utopia\Messaging\Adapters\SMS\Vonage;
|
|
||||||
use Utopia\Messaging\Messages\SMS;
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../init.php';
|
require_once __DIR__ . '/../init.php';
|
||||||
|
|
||||||
|
@ -59,14 +58,11 @@ class MessagingV1 extends Worker
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$message = new SMS(
|
$recipient = $this->args['recipient'];
|
||||||
to: [$this->args['recipient']],
|
$message = $this->args['message'];
|
||||||
content: $this->args['message'],
|
|
||||||
from: $this->from,
|
|
||||||
);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->sms->send($message);
|
$this->sms->send($this->from, $recipient, $message);
|
||||||
} catch (\Exception $error) {
|
} catch (\Exception $error) {
|
||||||
throw new Exception('Error sending message: ' . $error->getMessage(), 500);
|
throw new Exception('Error sending message: ' . $error->getMessage(), 500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
"utopia-php/orchestration": "0.9.*",
|
"utopia-php/orchestration": "0.9.*",
|
||||||
"utopia-php/platform": "0.3.*",
|
"utopia-php/platform": "0.3.*",
|
||||||
"utopia-php/pools": "0.4.*",
|
"utopia-php/pools": "0.4.*",
|
||||||
"utopia-php/swoole": "0.5.*",
|
|
||||||
"utopia-php/preloader": "0.2.*",
|
"utopia-php/preloader": "0.2.*",
|
||||||
"utopia-php/domains": "1.1.*",
|
"utopia-php/domains": "1.1.*",
|
||||||
"utopia-php/framework": "0.25.*",
|
"utopia-php/framework": "0.25.*",
|
||||||
|
@ -64,7 +63,8 @@
|
||||||
"utopia-php/logger": "0.3.*",
|
"utopia-php/logger": "0.3.*",
|
||||||
"utopia-php/messaging": "0.1.*",
|
"utopia-php/messaging": "0.1.*",
|
||||||
"utopia-php/registry": "0.5.*",
|
"utopia-php/registry": "0.5.*",
|
||||||
"utopia-php/storage": "0.11.*",
|
"utopia-php/storage": "0.13.*",
|
||||||
|
"utopia-php/swoole": "0.5.*",
|
||||||
"utopia-php/websocket": "0.1.0",
|
"utopia-php/websocket": "0.1.0",
|
||||||
"resque/php-resque": "1.3.6",
|
"resque/php-resque": "1.3.6",
|
||||||
"matomo/device-detector": "6.0.0",
|
"matomo/device-detector": "6.0.0",
|
||||||
|
|
14
composer.lock
generated
14
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "9fe0bbf14cd780146eed867f2d50e955",
|
"content-hash": "2b8002030d115fd67f57b89a9972f104",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/jwt",
|
"name": "adhocore/jwt",
|
||||||
|
@ -2573,16 +2573,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/storage",
|
"name": "utopia-php/storage",
|
||||||
"version": "0.11.0",
|
"version": "0.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/storage.git",
|
"url": "https://github.com/utopia-php/storage.git",
|
||||||
"reference": "59802cf281d1976560cf6e353f250a9b870efddc"
|
"reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/storage/zipball/59802cf281d1976560cf6e353f250a9b870efddc",
|
"url": "https://api.github.com/repos/utopia-php/storage/zipball/f34c010e4f8394a6b4aff70b6de55041d9a145d3",
|
||||||
"reference": "59802cf281d1976560cf6e353f250a9b870efddc",
|
"reference": "f34c010e4f8394a6b4aff70b6de55041d9a145d3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2622,9 +2622,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/storage/issues",
|
"issues": "https://github.com/utopia-php/storage/issues",
|
||||||
"source": "https://github.com/utopia-php/storage/tree/0.11.0"
|
"source": "https://github.com/utopia-php/storage/tree/0.13.0"
|
||||||
},
|
},
|
||||||
"time": "2022-08-31T09:17:31+00:00"
|
"time": "2022-11-17T15:10:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/swoole",
|
"name": "utopia-php/swoole",
|
||||||
|
|
|
@ -7,9 +7,9 @@ use Utopia\App;
|
||||||
use Utopia\Cache\Cache;
|
use Utopia\Cache\Cache;
|
||||||
use Utopia\Config\Config;
|
use Utopia\Config\Config;
|
||||||
use Utopia\Cache\Adapter\Sharding;
|
use Utopia\Cache\Adapter\Sharding;
|
||||||
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Database\Database;
|
use Utopia\Database\Database;
|
||||||
use Utopia\Storage\Device;
|
use Utopia\Storage\Device;
|
||||||
use Utopia\Storage\Storage;
|
|
||||||
use Utopia\Storage\Device\Local;
|
use Utopia\Storage\Device\Local;
|
||||||
use Utopia\Storage\Device\DOSpaces;
|
use Utopia\Storage\Device\DOSpaces;
|
||||||
use Utopia\Storage\Device\Linode;
|
use Utopia\Storage\Device\Linode;
|
||||||
|
@ -19,6 +19,7 @@ use Utopia\Storage\Device\S3;
|
||||||
use Utopia\Database\Document;
|
use Utopia\Database\Document;
|
||||||
use Utopia\Database\Validator\Authorization;
|
use Utopia\Database\Validator\Authorization;
|
||||||
use Utopia\DSN\DSN;
|
use Utopia\DSN\DSN;
|
||||||
|
use Utopia\Storage\Storage;
|
||||||
|
|
||||||
abstract class Worker
|
abstract class Worker
|
||||||
{
|
{
|
||||||
|
@ -280,7 +281,7 @@ abstract class Worker
|
||||||
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', '');
|
$connection = App::getEnv('_APP_CONNECTIONS_STORAGE', '');
|
||||||
|
|
||||||
$acl = 'private';
|
$acl = 'private';
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
$device = Storage::DEVICE_LOCAL;
|
||||||
$accessKey = '';
|
$accessKey = '';
|
||||||
$accessSecret = '';
|
$accessSecret = '';
|
||||||
$bucket = '';
|
$bucket = '';
|
||||||
|
@ -294,22 +295,21 @@ abstract class Worker
|
||||||
$bucket = $dsn->getPath();
|
$bucket = $dsn->getPath();
|
||||||
$region = $dsn->getParam('region');
|
$region = $dsn->getParam('region');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local storage.');
|
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.');
|
||||||
$device = STORAGE_DEVICE_LOCAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($device) {
|
switch ($device) {
|
||||||
case STORAGE_DEVICE_S3:
|
case Storage::DEVICE_S3:
|
||||||
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_DO_SPACES:
|
case STORAGE::DEVICE_DO_SPACES:
|
||||||
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_BACKBLAZE:
|
case Storage::DEVICE_BACKBLAZE:
|
||||||
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_LINODE:
|
case Storage::DEVICE_LINODE:
|
||||||
return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_WASABI:
|
case Storage::DEVICE_WASABI:
|
||||||
return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||||
case STORAGE_DEVICE_LOCAL:
|
case Storage::DEVICE_LOCAL:
|
||||||
default:
|
default:
|
||||||
return new Local($root);
|
return new Local($root);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue