Repository navigation
fix(files_sharing): serve the public share page at the URL of a file in it - #65174
Merged
Merged
Conversation
…in it
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>
skjnldsv
marked this pull request as ready for review
October 6, 2026 12:36
skjnldsv
requested review from
Altahrim,
leftybournes and
salmart-dev
and removed request for
a team
October 6, 2026 12:36
5 of 6 tasks
skjnldsv
added a commit
to nextcloud/text
that referenced
this pull request
Oct 6, 2026
CarlSchwan
approved these changes
Oct 6, 2026
nickvergessen
approved these changes
Oct 6, 2026
max-nextcloud
approved these changes
Oct 6, 2026
kesselb
approved these changes
Oct 6, 2026
benjaminfrueh
approved these changes
Oct 6, 2026
Antreesy
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since the public share page moved to Vue 3 (28d70ba), its router puts the file shown in the URL,
/s/{token}/{fileid}, for example when a file is opened in the viewer. The server only answers/s/{token}, so reloading the page after that shows "Page not found". Text's end-to-end tests hit it on nextcloud/text#9235: a public share of a markdown file, reloaded.This adds the route, numeric file ids only, to the same
showShare, which ignores the id: the page reads it from the URL on load.Checked on an instance of this branch:
/s/<token>/<fileid>?dir=/&openfile=truenow serves the page (it 404s onmaster), which opens the viewer on that file./s/<token>/previewstill answers, and a non-numeric second segment still 404s.Checklist
3. to review, feature component)stable32)AI (if applicable)
👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.