Skip to content

Commit

Permalink
fix(editor): Fix viewing and downloading of binary data (#6218)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed May 10, 2023
1 parent d5e62ff commit b9779c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/editor-ui/src/stores/workflows.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9779c3

Please sign in to comment.