1
0
Fork 0
mirror of synced 2024-10-01 09:47:43 +13:00

Update app/controllers/api/storage.php

Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
This commit is contained in:
Damodar Lohani 2021-09-15 10:40:30 +05:45 committed by GitHub
parent ccae13ac19
commit 49cfddae1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,13 +380,13 @@ App::put('/v1/storage/buckets/:bucketId')
$read ??= $bucket->getAttribute('$read', []); // By default inherit read permissions $read ??= $bucket->getAttribute('$read', []); // By default inherit read permissions
$write ??= $bucket->getAttribute('$write',[]); // By default inherit write permissions $write ??= $bucket->getAttribute('$write',[]); // By default inherit write permissions
$read??=$bucket->getAttribute('$read', []); // By default inherit read permissions $read ??= $bucket->getAttribute('$read', []); // By default inherit read permissions
$write??=$bucket->getAttribute('$write', []); // By default inherit write permissions $write ??= $bucket->getAttribute('$write', []); // By default inherit write permissions
$maximumFileSize??=$bucket->getAttribute('maximumFileSize', (int)App::getEnv('_APP_STORAGE_LIMIT', 0)); $maximumFileSize ??= $bucket->getAttribute('maximumFileSize', (int)App::getEnv('_APP_STORAGE_LIMIT', 0));
$allowedFileExtensions??=$bucket->getAttribute('allowedFileExtensions', []); $allowedFileExtensions ??= $bucket->getAttribute('allowedFileExtensions', []);
$enabled??=$bucket->getAttribute('enabled', true); $enabled ??= $bucket->getAttribute('enabled', true);
$encryption??=$bucket->getAttribute('encryption', true); $encryption ??= $bucket->getAttribute('encryption', true);
$antiVirus??=$bucket->getAttribute('antiVirus', true); $antiVirus ??= $bucket->getAttribute('antiVirus', true);
$bucket = $dbForInternal->updateDocument('buckets', $bucket->getId(), $bucket $bucket = $dbForInternal->updateDocument('buckets', $bucket->getId(), $bucket
->setAttribute('name',$name) ->setAttribute('name',$name)