Skip to content

Commit b454132

Browse files
danxuliuszaimen
authored andcommitted
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 <danxuliu@gmail.com>
1 parent c31e53a commit b454132

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/views/PDFView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ export default {
7070
},
7171
7272
async mounted() {
73-
if (!this.isDownloadable) {
73+
if (!this.isDownloadable || (this.hideDownload && this.isRichDocumentsAvailable)) {
7474
this.doneLoading()
7575
7676
if (this.isRichDocumentsAvailable) {
77-
console.info('PDF file is not downloadable, but "richdocuments" is available, so falling back to it')
77+
console.info('PDF file is not downloadable or has a hidden download, but "richdocuments" is available, so falling back to it')
7878
7979
// Opening the viewer again overwrites its current state, so the
8080
// current options need to be explicitly passed again.

0 commit comments

Comments
 (0)