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
parent
commit
4150492ffc
No known key found for this signature in database GPG Key ID: 45FAE7268762B400
  1. 2
      apps/files/lib/Controller/ViewController.php

2
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));
}

Loading…
Cancel
Save