From 6a14b375db64d11ad6079d3f3ebbc0b008c1bdbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= <14975046+skjnldsv@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:34:42 +0200 Subject: [PATCH] fix(files_sharing): serve the public share page at the URL of a file in it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The public share page puts the file shown in its URL (/s/{token}/{fileid}) since its move to Vue 3, and the server only answered /s/{token}: reloading the page once a file was open gave a page not found. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com> --- apps/files_sharing/appinfo/routes.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index f86bc3feba10b..87137d0665e0d 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -18,6 +18,16 @@ 'verb' => 'GET', 'root' => '', ], + [ + // The public page puts the file shown in its URL, which a reload + // asks the server for + 'name' => 'Share#showShare', + 'postfix' => 'fileid', + 'url' => '/s/{token}/{fileid}', + 'verb' => 'GET', + 'root' => '', + 'requirements' => ['fileid' => '\\d+'], + ], [ 'name' => 'Share#showAuthenticate', 'url' => '/s/{token}/authenticate/{redirect}',