1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

linter fix

This commit is contained in:
Damodar Lohani 2022-08-31 02:56:44 +00:00
parent 63f95c0a5c
commit bc7ec3854f
2 changed files with 4 additions and 5 deletions

View file

@ -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);

View file

@ -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
}
/**