mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix preview output when no output param and type doesn't exist
This commit is contained in:
@@ -951,7 +951,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
|
||||
$data = $cache->load($key, 60 * 60 * 24 * 30 * 3/* 3 months */);
|
||||
|
||||
if ($data) {
|
||||
$output = (empty($output)) ? $type : $output;
|
||||
$output = (empty($output)) ? ( empty($type) ? 'jpg' : $type ) : $output;
|
||||
|
||||
return $response
|
||||
->setContentType((\array_key_exists($output, $outputs)) ? $outputs[$output] : $outputs['jpg'])
|
||||
|
||||
Reference in New Issue
Block a user