image: use output buffer for multipreview

pull/460/head
Varun Patil 2023-02-27 10:01:04 -08:00
parent 37940b13f1
commit efec646ecb
1 changed files with 2 additions and 1 deletions

View File

@ -151,6 +151,7 @@ class ImageController extends ApiBase
continue; continue;
} }
ob_start();
echo json_encode([ echo json_encode([
'reqid' => $reqid, 'reqid' => $reqid,
'Content-Length' => \strlen($content), 'Content-Length' => \strlen($content),
@ -158,7 +159,7 @@ class ImageController extends ApiBase
]); ]);
echo "\n"; echo "\n";
echo $content; echo $content;
flush(); ob_end_flush();
} catch (\OCP\Files\NotFoundException $e) { } catch (\OCP\Files\NotFoundException $e) {
continue; continue;
} catch (\Exception $e) { } catch (\Exception $e) {