-
Notifications
You must be signed in to change notification settings - Fork 55
fix: Remove custom handling for public share pages with single files #1164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Merged
4 tasks
36 tasks
Collaborator
|
Is this ready for review? |
d7ce11c to
6fc9513
Compare
Member
Author
|
/compile / |
Member
Author
Yes, but kept as draft until #1203 is merged and this pull request rebased on master (but other than that it is already ready and can be reviewed). |
Since Nextcloud 31 the public share pages for single files and folders were unified, and public single file shares now show a file list with a single file. Due to that it is no longer needed to explicitly inject the PDF viewer in public shage pages or adjust the style, as the PDF viewer will be loaded as needed by the Viewer component. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Since Nextcloud 31 the "hideDownload" HTML element no longer exists. Between Nextcloud 31.0.0 and 31.0.4 (both included) "hide download" behaved as "prevent download", so the PDF viewer could not show the file at all in that case. In Nextcloud 31.0.5 the "hide download" behaviour was restored, although the setting is now provided as a WebDAV property (which is included in the file data), so the PDF viewer had to be adjusted to that. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Even if the PDF viewer was able to show the file when the download is hidden, before Nextcloud 31 the custom handling for public shares of a single file opened it in Nextcloud Office instead. For consistency with the previous behaviour now Nextcloud Office is used again in that case. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
a6f25f4 to
d0b5499
Compare
Collaborator
|
/compile amend / |
Signed-off-by: nextcloud-command <[email protected]>
d0b5499 to
743cd3b
Compare
szaimen
approved these changes
May 6, 2025
Collaborator
szaimen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and seems to work :)
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.
Requires #1203
Fixes #1047
Since Nextcloud 31 the public share pages for single files and folders were unified, and public single file shares now show a file list with a single file. Due to that it is no longer needed to explicitly inject the PDF viewer in public shage pages or adjust the style, as the PDF viewer will be loaded as needed by the Viewer component.
This pull request also adjusts the PDF viewer to use the new
hideDownloadDAV property, which restores the Hide download behaviour that was temporary broken in Nextcloud 31.Although the PDF viewer is able to show PDF files if the download is hidden (although not if it is disabled) the custom handling of public shares before Nextcloud 31 opened the PDF file in Nextcloud Office instead, so that behaviour is also explicitly kept in the new public share pages.