mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Updated preview controller
This commit is contained in:
parent
cfbc32122f
commit
eb1e44cb05
1 changed files with 6 additions and 8 deletions
|
|
@ -429,18 +429,16 @@ $utopia->get('/v1/storage/files/:fileId/preview')
|
|||
|
||||
$output = (empty($output)) ? $type : $output;
|
||||
|
||||
$response
|
||||
->setContentType($outputs[$output])
|
||||
->addHeader('Expires', $date)
|
||||
->addHeader('X-Appwrite-Cache', 'miss')
|
||||
->send('')
|
||||
;
|
||||
|
||||
$data = $resize->output($output, $quality);
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
echo $data;
|
||||
$response
|
||||
->setContentType($outputs[$output])
|
||||
->addHeader('Expires', $date)
|
||||
->addHeader('X-Appwrite-Cache', 'miss')
|
||||
->send($data)
|
||||
;
|
||||
|
||||
unset($resize);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue