Skip to content

Commit d9a73dd

Browse files
ChristophWurstnextcloud-command
authored andcommitted
Fix download URL of non-dav files
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent 24ffc73 commit d9a73dd

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

js/viewer-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/views/Viewer.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<NcActionLink v-if="canDownload"
6666
:download="currentFile.basename"
6767
:close-after-click="true"
68-
:href="currentFile.davPath">
68+
:href="downloadPath">
6969
<template #icon>
7070
<Download :size="24" />
7171
</template>
@@ -212,6 +212,9 @@ export default {
212212
},
213213
214214
computed: {
215+
downloadPath() {
216+
return this.currentFile.source ?? this.currentFile.davPath
217+
},
215218
hasPrevious() {
216219
return this.fileList.length > 1
217220
},

0 commit comments

Comments
 (0)