summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-03 13:53:53 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-05 16:42:14 +0200
commit564b5ac8d47390b7adc06ac05f96ca0b00c0bfd1 (patch)
tree4890bc1cec73b99def3900bee34e3b360d09fc47
parenta280434b00ee18158270c11d7e44a014a0d6bd11 (diff)
downloadnextcloud-server-564b5ac8d47390b7adc06ac05f96ca0b00c0bfd1.tar.gz
nextcloud-server-564b5ac8d47390b7adc06ac05f96ca0b00c0bfd1.zip
fix(files): When redirecting to a file (internal link) then it should open by default
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/files/lib/Controller/ViewController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index e1d84641e2a..3b55eadfbdd 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -415,6 +415,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));
}