From 920cf96886400abafffbc82ad414145408fd6d6d Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Tue, 14 Jan 2025 12:54:55 +0100 Subject: [PATCH] fix: Generate preview with proper aspect ratio for templates Signed-off-by: Julius Knorr --- lib/Template/CollaboraTemplateProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Template/CollaboraTemplateProvider.php b/lib/Template/CollaboraTemplateProvider.php index b9f48ebd9c..3a51629cd3 100644 --- a/lib/Template/CollaboraTemplateProvider.php +++ b/lib/Template/CollaboraTemplateProvider.php @@ -46,7 +46,7 @@ public function getCustomTemplates(string $mimetype): array { return array_map(function (File $file) { $template = new Template(CollaboraTemplateProvider::class, (string)$file->getId(), $file); - $template->setCustomPreviewUrl($this->urlGenerator->linkToRouteAbsolute('richdocuments.templates.getPreview', ['fileId' => $file->getId()])); + $template->setCustomPreviewUrl($this->urlGenerator->linkToRouteAbsolute('richdocuments.templates.getPreview', ['fileId' => $file->getId(), 'a' => true])); return $template; }, $collaboraTemplates); }