diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-05-27 16:55:48 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-05-27 17:24:16 +0200 |
commit | acf697daeb6bc1776d48e1649f40fa66261e5fd8 (patch) | |
tree | c0db22b683697cdd243f4e51e0ad6537306b5123 /src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | |
parent | 4b2ef5c08a0a976568178c52d174f6008c996eb2 (diff) |
Encode dav path segments for direct preview
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue')
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue index c7d3b4292..b013d62d0 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue @@ -77,6 +77,7 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import Close from 'vue-material-design-icons/Close' import PlayCircleOutline from 'vue-material-design-icons/PlayCircleOutline' import { getCapabilities } from '@nextcloud/capabilities' +import { encodePath } from '@nextcloud/paths' const PREVIEW_TYPE = { TEMPORARY: 0, @@ -289,10 +290,10 @@ export default { // return direct image if (userId === null) { // guest mode, use public link download URL - return this.link + '/download/' + this.name + return this.link + '/download/' + encodePath(this.name) } else { // use direct DAV URL - return generateRemoteUrl(`dav/files/${userId}`) + this.internalAbsolutePath + return generateRemoteUrl(`dav/files/${userId}`) + encodePath(this.internalAbsolutePath) } } |