]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): When redirecting to a file (internal link) then it should open by default
authorFerdinand Thiessen <opensource@fthiessen.de>
Sat, 3 Aug 2024 11:53:53 +0000 (13:53 +0200)
committerFerdinand Thiessen <opensource@fthiessen.de>
Sat, 3 Aug 2024 11:53:53 +0000 (13:53 +0200)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files/lib/Controller/ViewController.php

index ea3c751c826956f715e20e2e3de9d69f1644848c..cdad09d27a1e26108a48105fefdb648fb56c2cf2 100644 (file)
@@ -335,6 +335,8 @@ class ViewController extends Controller {
                        } 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));
                }