From c89b83a76adeaff1c60ade710cf55ccca513ef00 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Wed, 27 Jan 2021 15:28:14 -0500 Subject: [PATCH] Add token to download links Fixes #3451 --- app/src/interfaces/file/file.vue | 2 +- app/src/interfaces/image/image.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/interfaces/file/file.vue b/app/src/interfaces/file/file.vue index 5654f3a8e9..c3794581e3 100644 --- a/app/src/interfaces/file/file.vue +++ b/app/src/interfaces/file/file.vue @@ -163,7 +163,7 @@ export default defineComponent({ const assetURL = computed(() => { const id = typeof props.value === 'string' ? props.value : (props.value as Record)?.id; - return getRootPath() + `assets/${id}`; + return addTokenToURL(getRootPath() + `assets/${id}`); }); const imageThumbnail = computed(() => { diff --git a/app/src/interfaces/image/image.vue b/app/src/interfaces/image/image.vue index 8941cc1a58..6bca26c313 100644 --- a/app/src/interfaces/image/image.vue +++ b/app/src/interfaces/image/image.vue @@ -106,7 +106,7 @@ export default defineComponent({ const downloadSrc = computed(() => { if (!image.value) return null; - return getRootPath() + `assets/${image.value.id}`; + return addTokenToURL(getRootPath() + `assets/${image.value.id}`); }); const meta = computed(() => {