diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index 3eb0ab7b16..8776002a79 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -505,7 +505,7 @@ App::post('/v1/storage/buckets/:bucketId/files') $algorithm = $bucket->getAttribute('compression', 'none'); if ($fileSize <= APP_STORAGE_READ_BUFFER && $algorithm != 'none') { $data = $deviceFiles->read($path); - switch($algorithm) { + switch ($algorithm) { case 'zstd': $compressor = new Zstd(); case 'gzip': @@ -887,7 +887,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview') ); } - switch($algorithm) { + switch ($algorithm) { case 'zstd': $compressor = new Zstd(); $source = $compressor->decompress($source); @@ -1030,7 +1030,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download') ); } - switch($file->getAttribute('algorithm', 'none')) { + switch ($file->getAttribute('algorithm', 'none')) { case 'zstd': if (empty($source)) { $source = $deviceFiles->read($path); @@ -1180,7 +1180,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view') ); } - switch($file->getAttribute('algorithm', 'none')) { + switch ($file->getAttribute('algorithm', 'none')) { case 'zstd': if (empty($source)) { $source = $deviceFiles->read($path); diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index 2d70a60b5f..10a47540a0 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -288,7 +288,6 @@ trait StorageBase $this->assertEquals('image/png', $file['body']['mimeType']); $this->assertEquals(47218, $file['body']['sizeOriginal']); $this->assertTrue(md5_file(realpath(__DIR__ . '/../../../resources/logo.png')) != $file['body']['signature']); // should validate that the file is encrypted - } /**