From 2ff1c00f556633c9c36a9328d4eb77eba2dd25e7 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Sun, 5 Feb 2023 11:22:50 +0100 Subject: fix(files_trashbin): previews crop support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files_trashbin/lib/Controller/PreviewController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/files_trashbin/lib/Controller') diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php index 22ca56d8f36..652570dccd7 100644 --- a/apps/files_trashbin/lib/Controller/PreviewController.php +++ b/apps/files_trashbin/lib/Controller/PreviewController.php @@ -89,8 +89,9 @@ class PreviewController extends Controller { */ public function getPreview( int $fileId = -1, - int $x = 128, - int $y = 128 + int $x = 32, + int $y = 32, + bool $a = false, ) { if ($fileId === -1 || $x === 0 || $y === 0) { return new DataResponse([], Http::STATUS_BAD_REQUEST); @@ -118,7 +119,7 @@ class PreviewController extends Controller { $mimeType = $this->mimeTypeDetector->detectPath($file->getName()); } - $f = $this->previewManager->getPreview($file, $x, $y, true, IPreview::MODE_FILL, $mimeType); + $f = $this->previewManager->getPreview($file, $x, $y, $a, IPreview::MODE_FILL, $mimeType); $response = new Http\FileDisplayResponse($f, Http::STATUS_OK, ['Content-Type' => $f->getMimeType()]); // Cache previews for 24H -- cgit v1.2.3