From c9d5ab2c09d5eb84d52adb9f5dd825a9e2740160 Mon Sep 17 00:00:00 2001 From: Mert E Date: Fri, 14 Jun 2024 08:46:17 +0300 Subject: [PATCH] fix: avoid extra encode (#8739) --- packages/nc-gui/composables/useAttachment.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useAttachment.ts b/packages/nc-gui/composables/useAttachment.ts index dddded1da2..0b6dd5f51c 100644 --- a/packages/nc-gui/composables/useAttachment.ts +++ b/packages/nc-gui/composables/useAttachment.ts @@ -5,9 +5,9 @@ const useAttachment = () => { const res: string[] = [] if (item?.data) res.push(item.data) if (item?.file) res.push(window.URL.createObjectURL(item.file)) - if (item?.signedPath) res.push(encodeURI(`${appInfo.value.ncSiteUrl}/${item.signedPath}`)) - if (item?.signedUrl) res.push(encodeURI(item.signedUrl)) - if (item?.path) res.push(encodeURI(`${appInfo.value.ncSiteUrl}/${item.path}`)) + if (item?.signedPath) res.push(`${appInfo.value.ncSiteUrl}/${encodeURI(item.signedPath)}`) + if (item?.signedUrl) res.push(item.signedUrl) + if (item?.path) res.push(`${appInfo.value.ncSiteUrl}/${encodeURI(item.path)}`) if (item?.url) res.push(item.url) return res }