code refactor
This commit is contained in:
parent
3a43ef95b1
commit
e37da6a5f7
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue