From 564b5ac8d47390b7adc06ac05f96ca0b00c0bfd1 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 3 Aug 2024 13:53:53 +0200 Subject: [PATCH] fix(files): When redirecting to a file (internal link) then it should open by default Signed-off-by: Ferdinand Thiessen --- apps/files/lib/Controller/ViewController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index e1d84641e2a3e..3b55eadfbddab 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -415,6 +415,8 @@ private function redirectToFile(int $fileId) { } else { // set parent path as dir $params['dir'] = $baseFolder->getRelativePath($node->getParent()->getPath()); + // open the file by default (opening the viewer) + $params['openfile'] = 'true'; } return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params)); }