From 110c6e286fa452a5b92076be5e973858f17d46ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 10 May 2023 11:45:29 +0000 Subject: [PATCH] fix(editor): Fix viewing and downloading of binary data (#6218) NODE-525 --- packages/editor-ui/src/stores/workflows.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/stores/workflows.ts b/packages/editor-ui/src/stores/workflows.ts index de6fcef0cc425..b82430f6e0bcb 100644 --- a/packages/editor-ui/src/stores/workflows.ts +++ b/packages/editor-ui/src/stores/workflows.ts @@ -1227,7 +1227,12 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, { return makeRestApiRequest(rootStore.getRestApiContext, 'GET', '/eventbus/execution/' + id); }, // Binary data - async getBinaryUrl(dataPath, mode, fileName, mimeType): string { + getBinaryUrl( + dataPath: string, + mode: 'view' | 'download', + fileName: string, + mimeType: string, + ): string { const rootStore = useRootStore(); let restUrl = rootStore.getRestUrl; if (restUrl.startsWith('/')) restUrl = window.location.origin + restUrl;