Skip to content

Commit 64e4c8f

Browse files
committed
v
1 parent 55e14bc commit 64e4c8f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

services/static-webserver/client/source/class/osparc/file/FileLabelWithActions.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,17 +280,20 @@ qx.Class.define("osparc.file.FileLabelWithActions", {
280280
}
281281
}, this);
282282
task.addListener("resultReceived", e => {
283-
const data = e.getData();
284-
if (data["result"]) {
283+
const taskData = e.getData();
284+
if (taskData["result"]) {
285285
const params = {
286286
url: {
287287
locationId: 0,
288-
fileUuid: encodeURIComponent(data["result"]),
288+
fileUuid: encodeURIComponent(taskData["result"]),
289289
}
290290
};
291291
osparc.data.Resources.fetch("storageLink", "getOne", params)
292-
.then(data2 => {
293-
osparc.utils.Utils.downloadLink(data2.link, "GET", "hey");
292+
.then(data => {
293+
if (data && data.link) {
294+
const fileName = taskData["result"].split("/").pop();
295+
osparc.utils.Utils.downloadLink(data.link, "GET", fileName);
296+
}
294297
})
295298
}
296299
progressWindow.close();

0 commit comments

Comments
 (0)