Browse Source
fix(files): When redirecting to a file (internal link) then it should open by default
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/47015/head
Ferdinand Thiessen
1 year ago
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with
2 additions and
0 deletions
-
apps/files/lib/Controller/ViewController.php
|
|
|
@ -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)); |
|
|
|
} |
|
|
|
|