Skip to content

Commit 48a1b78

Browse files
authored
Merge pull request #47024 from nextcloud/backport/47015/stable28
[stable28] fix(files): Correctly handle open file URL query
2 parents a280434 + 564b5ac commit 48a1b78

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

apps/files/lib/Controller/ViewController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ private function redirectToFile(int $fileId) {
415415
} else {
416416
// set parent path as dir
417417
$params['dir'] = $baseFolder->getRelativePath($node->getParent()->getPath());
418+
// open the file by default (opening the viewer)
419+
$params['openfile'] = 'true';
418420
}
419421
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.indexViewFileid', $params));
420422
}

0 commit comments

Comments
 (0)