Skip to content

fix(files_sharing): respect openfile parameter for external file shares - #65997

Open
sundeep8967 wants to merge 1 commit into
nextcloud:masterfrom
sundeep8967:fix/public-share-respect-openfile-param-65814
Open

sundeep8967 wants to merge 1 commit into
nextcloud:masterfrom
sundeep8967:fix/public-share-respect-openfile-param-65814

Conversation

@sundeep8967

Copy link
Copy Markdown

Summary

When opening an external single-file share link with ?openfile=false, apps/files_sharing/src/init-public.ts previously hardcoded openfile: 'true' during router redirection. This caused the viewer to autoplay/open the file even when explicitly requested not to open it.

Solution

Check window.OCP.Files.Router.query.openfile and preserve 'false' when supplied; otherwise default to 'true'.

Resolves #65814

When navigating to an external single-file share with `openfile=false`,
the public router initialization previously hardcoded `openfile: 'true'`
in goToRoute(), causing the file viewer to open automatically even when
explicitly requested not to autoplay or open.

Check the current query parameter and preserve 'false' when provided.

Fixes nextcloud#65814

Signed-off-by: sundeep8967 <sundeep8967@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: External links lose openfile parameter value

1 participant