mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix viewing and downloading of binary data (#6218)
NODE-525
This commit is contained in:
parent
d5e62ff096
commit
b9779c3293
|
@ -1227,7 +1227,12 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||||
return makeRestApiRequest(rootStore.getRestApiContext, 'GET', '/eventbus/execution/' + id);
|
return makeRestApiRequest(rootStore.getRestApiContext, 'GET', '/eventbus/execution/' + id);
|
||||||
},
|
},
|
||||||
// Binary data
|
// Binary data
|
||||||
async getBinaryUrl(dataPath, mode, fileName, mimeType): string {
|
getBinaryUrl(
|
||||||
|
dataPath: string,
|
||||||
|
mode: 'view' | 'download',
|
||||||
|
fileName: string,
|
||||||
|
mimeType: string,
|
||||||
|
): string {
|
||||||
const rootStore = useRootStore();
|
const rootStore = useRootStore();
|
||||||
let restUrl = rootStore.getRestUrl;
|
let restUrl = rootStore.getRestUrl;
|
||||||
if (restUrl.startsWith('/')) restUrl = window.location.origin + restUrl;
|
if (restUrl.startsWith('/')) restUrl = window.location.origin + restUrl;
|
||||||
|
|
Loading…
Reference in a new issue