Skip to content

Commit 950ec79

Browse files
committed
Request preview with the same size as in the file listing
Potentially will allow bigger caching potential with a few other changes in the server repo Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 9871c3c commit 950ec79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Controller/APIv2Controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ protected function getPreview(string $owner, int $fileId, string $filePath): arr
376376
if (!$fileInfo instanceof FileInfo) {
377377
$preview = $this->getPreviewFromPath($fileId, $filePath, $info);
378378
} elseif ($this->preview->isAvailable($fileInfo)) {
379-
$preview['source'] = $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreview', [
380-
'file' => $info['path'],
379+
$preview['source'] = $this->urlGenerator->linkToRouteAbsolute('core.Preview.getPreviewByFileId', [
380+
'fileId' => $fileId,
381381
'c' => $this->view->getETag($info['path']),
382-
'x' => 150,
383-
'y' => 150,
382+
'x' => 250,
383+
'y' => 250,
384384
]);
385385
$preview['mimeType'] = $fileInfo->getMimetype() ?: 'application/octet-stream';
386386
$preview['isMimeTypeIcon'] = false;

0 commit comments

Comments
 (0)