mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
[files] new internal link GET param to avoid setting 'openfile' on redirect
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
parent
6a7b088adb
commit
b67b4b160b
1 changed files with 2 additions and 2 deletions
|
|
@ -162,10 +162,10 @@ class ViewController extends Controller {
|
|||
* @return TemplateResponse|RedirectResponse
|
||||
* @throws NotFoundException
|
||||
*/
|
||||
public function showFile(string $fileid = null): Response {
|
||||
public function showFile(string $fileid = null, int $openfile = 1): Response {
|
||||
// This is the entry point from the `/f/{fileid}` URL which is hardcoded in the server.
|
||||
try {
|
||||
return $this->redirectToFile($fileid, true);
|
||||
return $this->redirectToFile($fileid, $openfile !== 0);
|
||||
} catch (NotFoundException $e) {
|
||||
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true]));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue