From efec646ecb109b03b61f860e0ab0d7a885aedcab Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 27 Feb 2023 10:01:04 -0800 Subject: [PATCH] image: use output buffer for multipreview --- lib/Controller/ImageController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Controller/ImageController.php b/lib/Controller/ImageController.php index 17711fdf..f414b4fb 100644 --- a/lib/Controller/ImageController.php +++ b/lib/Controller/ImageController.php @@ -151,6 +151,7 @@ class ImageController extends ApiBase continue; } + ob_start(); echo json_encode([ 'reqid' => $reqid, 'Content-Length' => \strlen($content), @@ -158,7 +159,7 @@ class ImageController extends ApiBase ]); echo "\n"; echo $content; - flush(); + ob_end_flush(); } catch (\OCP\Files\NotFoundException $e) { continue; } catch (\Exception $e) {