aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src/components/TemplatePreview.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src/components/TemplatePreview.vue')
-rw-r--r--apps/files/src/components/TemplatePreview.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/src/components/TemplatePreview.vue b/apps/files/src/components/TemplatePreview.vue
index 53195d028c6..8418b1c365b 100644
--- a/apps/files/src/components/TemplatePreview.vue
+++ b/apps/files/src/components/TemplatePreview.vue
@@ -47,8 +47,8 @@
</template>
<script>
+import { encodePath } from '@nextcloud/paths'
import { generateUrl } from '@nextcloud/router'
-import { encodeFilePath } from '../utils/fileUtils.ts'
import { getToken, isPublic } from '../utils/davUtils.js'
// preview width generation
@@ -124,7 +124,7 @@ export default {
}
// TODO: find a nicer standard way of doing this?
if (isPublic()) {
- return generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodeFilePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)
+ return generateUrl(`/apps/files_sharing/publicpreview/${getToken()}?fileId=${this.fileid}&file=${encodePath(this.filename)}&x=${previewWidth}&y=${previewWidth}&a=1`)
}
return generateUrl(`/core/preview?fileId=${this.fileid}&x=${previewWidth}&y=${previewWidth}&a=1`)
},