Skip to content

fix(files_sharing): serve the public share page at the URL of a file in it - #65174

Merged
skjnldsv merged 1 commit into
masterfrom
fix/public-share-fileid-route
Oct 6, 2026
Merged

skjnldsv merged 1 commit into
masterfrom
fix/public-share-fileid-route

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

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=true now serves the page (it 404s on master), which opens the viewer on that file. /s/<token>/preview still answers, and a non-numeric second segment still 404s.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

…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 skjnldsv added this to the Nextcloud 36 milestone Oct 6, 2026
@skjnldsv skjnldsv self-assigned this Oct 6, 2026
@skjnldsv
skjnldsv marked this pull request as ready for review October 6, 2026 12:36
@skjnldsv
skjnldsv requested a review from a team as a code owner October 6, 2026 12:36
@skjnldsv skjnldsv removed the 2. developing Work in progress label Oct 6, 2026
@skjnldsv
skjnldsv requested review from Altahrim, leftybournes and salmart-dev and removed request for a team October 6, 2026 12:36
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label Oct 6, 2026
skjnldsv added a commit to nextcloud/text that referenced this pull request Oct 6, 2026
@skjnldsv
skjnldsv merged commit 5287612 into master Oct 6, 2026
177 of 195 checks passed
@skjnldsv
skjnldsv deleted the fix/public-share-fileid-route branch October 6, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants