mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge pull request #9515 from appwrite/feat-env-to-system
Feat env vars to system lib
This commit is contained in:
commit
5a5d43f3d0
1 changed files with 2 additions and 2 deletions
|
|
@ -525,7 +525,7 @@ function getDevice(string $root, string $connection = ''): Device
|
||||||
$accessSecret = '';
|
$accessSecret = '';
|
||||||
$bucket = '';
|
$bucket = '';
|
||||||
$region = '';
|
$region = '';
|
||||||
$url = App::getEnv('_APP_STORAGE_S3_ENDPOINT', '');
|
$url = System::getEnv('_APP_STORAGE_S3_ENDPOINT', '');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$dsn = new DSN($connection);
|
$dsn = new DSN($connection);
|
||||||
|
|
@ -566,7 +566,7 @@ function getDevice(string $root, string $connection = ''): Device
|
||||||
$s3Region = System::getEnv('_APP_STORAGE_S3_REGION', '');
|
$s3Region = System::getEnv('_APP_STORAGE_S3_REGION', '');
|
||||||
$s3Bucket = System::getEnv('_APP_STORAGE_S3_BUCKET', '');
|
$s3Bucket = System::getEnv('_APP_STORAGE_S3_BUCKET', '');
|
||||||
$s3Acl = 'private';
|
$s3Acl = 'private';
|
||||||
$s3EndpointUrl = App::getEnv('_APP_STORAGE_S3_ENDPOINT', '');
|
$s3EndpointUrl = System::getEnv('_APP_STORAGE_S3_ENDPOINT', '');
|
||||||
return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl, $s3EndpointUrl);
|
return new S3($root, $s3AccessKey, $s3SecretKey, $s3Bucket, $s3Region, $s3Acl, $s3EndpointUrl);
|
||||||
case Storage::DEVICE_DO_SPACES:
|
case Storage::DEVICE_DO_SPACES:
|
||||||
$doSpacesAccessKey = System::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', '');
|
$doSpacesAccessKey = System::getEnv('_APP_STORAGE_DO_SPACES_ACCESS_KEY', '');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue