Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Feb 26, 2025

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 hideDownload DAV 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.

@szaimen
Copy link
Collaborator

szaimen commented Apr 27, 2025

Is this ready for review?

@danxuliu danxuliu force-pushed the remove-custom-handling-for-public-share-pages branch from d7ce11c to 6fc9513 Compare May 6, 2025 06:19
@danxuliu
Copy link
Member Author

danxuliu commented May 6, 2025

/compile /

@danxuliu
Copy link
Member Author

danxuliu commented May 6, 2025

Is this ready for review?

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).

danxuliu added 3 commits May 6, 2025 09:43
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>
@szaimen szaimen force-pushed the remove-custom-handling-for-public-share-pages branch from a6f25f4 to d0b5499 Compare May 6, 2025 07:43
@szaimen szaimen marked this pull request as ready for review May 6, 2025 07:43
@szaimen
Copy link
Collaborator

szaimen commented May 6, 2025

/compile amend /

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the remove-custom-handling-for-public-share-pages branch from d0b5499 to 743cd3b Compare May 6, 2025 08:22
Copy link
Collaborator

@szaimen szaimen left a 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 :)

@szaimen szaimen enabled auto-merge May 6, 2025 08:27
@szaimen szaimen merged commit 353bf77 into master May 6, 2025
39 checks passed
@danxuliu danxuliu deleted the remove-custom-handling-for-public-share-pages branch May 6, 2025 09:17
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@skjnldsv skjnldsv added this to the Nextcloud 32 milestone Oct 2, 2025
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.

[Nextcloud 31] Public share not correctly detected

5 participants