-
Couldn't load subscription status.
- Fork 52
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
Conversation
|
Is this ready for review? |
d7ce11c to
6fc9513
Compare
|
/compile / |
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
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 <danxuliu@gmail.com>
a6f25f4 to
d0b5499
Compare
|
/compile amend / |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
d0b5499 to
743cd3b
Compare
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 :)
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.