fix: Generate preview with proper aspect ratio for templates

Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
Julius Knorr 2025-01-14 12:54:55 +01:00
parent 8c21f5edd7
commit 920cf96886
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -46,7 +46,7 @@ class CollaboraTemplateProvider implements ICustomTemplateProvider {
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);
}