Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Open PDF file in "richdocuments" if download is hidden
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]>
  • Loading branch information
danxuliu authored and szaimen committed May 6, 2025
commit 92d1ed75881ec5b858322d9dcb5413f10d3acbf7
4 changes: 2 additions & 2 deletions src/views/PDFView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ export default {
},

async mounted() {
if (!this.isDownloadable) {
if (!this.isDownloadable || (this.hideDownload && this.isRichDocumentsAvailable)) {
this.doneLoading()

if (this.isRichDocumentsAvailable) {
console.info('PDF file is not downloadable, but "richdocuments" is available, so falling back to it')
console.info('PDF file is not downloadable or has a hidden download, but "richdocuments" is available, so falling back to it')

// Opening the viewer again overwrites its current state, so the
// current options need to be explicitly passed again.
Expand Down