fix(core): Handle missing binary metadata in download urls (#5242)
This commit is contained in:
committed by
GitHub
parent
ac460aa841
commit
21579a8a2a
@@ -202,8 +202,15 @@ export const restApi = Vue.extend({
|
||||
},
|
||||
|
||||
// Binary data
|
||||
getBinaryUrl: (dataPath, mode): string =>
|
||||
self.rootStore.getRestApiContext.baseUrl + `/data/${dataPath}?mode=${mode}`,
|
||||
getBinaryUrl: (dataPath, mode, fileName, mimeType): string => {
|
||||
let restUrl = self.rootStore.getRestUrl;
|
||||
if (restUrl.startsWith('/')) restUrl = window.location.origin + restUrl;
|
||||
const url = new URL(`${restUrl}/data/${dataPath}`);
|
||||
url.searchParams.append('mode', mode);
|
||||
if (fileName) url.searchParams.append('fileName', fileName);
|
||||
if (mimeType) url.searchParams.append('mimeType', mimeType);
|
||||
return url.toString();
|
||||
},
|
||||
|
||||
// Returns all the available timezones
|
||||
getExecutionEvents: (id: string): Promise<IAbstractEventMessage[]> => {
|
||||
|
||||
Reference in New Issue
Block a user