Skip to content

Commit 564b5ac

Browse files
committed
fix(files): When redirecting to a file (internal link) then it should open by default
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent a280434 commit 564b5ac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/files/lib/Controller/ViewController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ private function redirectToFile(int $fileId) {
415415
} else {
416416
// set parent path as dir
417417
$params['dir'] = $baseFolder->getRelativePath($node->getParent()->getPath());
418+
// open the file by default (opening the viewer)
419+
$params['openfile'] = 'true';
418420
}
419421
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params));
420422
}

0 commit comments

Comments
 (0)