1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

code refactor

This commit is contained in:
Damodar Lohani 2022-03-18 11:51:59 +00:00
parent 3a43ef95b1
commit e37da6a5f7

View file

@ -945,11 +945,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */);
if(empty($output)) {
if(empty($type)) {
$output = array_search($mime, $outputs) ?? 'jpg';
} else {
$output = $type;
}
$output = empty($type) ? (array_search($mime, $outputs) ?? 'jpg') : $type;
}
if ($data) {