Skip to content

Commit 85d1916

Browse files
committed
getAllItems
1 parent fe0949b commit 85d1916

File tree

1 file changed

+6
-10
lines changed
  • services/static-webserver/client/source/class/osparc/file

1 file changed

+6
-10
lines changed

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,12 @@ qx.Class.define("osparc.file.FilePicker", {
152152
getOutputFileMetadata: function(node) {
153153
return new Promise((resolve, reject) => {
154154
const outValue = osparc.file.FilePicker.getOutput(node.getOutputs());
155-
const params = {
156-
url: {
157-
locationId: outValue.store,
158-
path: outValue.path
159-
}
160-
};
161-
osparc.data.Resources.fetch("storagePaths", "getPaths", params)
162-
.then(pagResp => {
163-
if (pagResp["items"]) {
164-
const file = pagResp["items"].find(item => item.path === outValue.path);
155+
const locationId = outValue.store;
156+
const path = outValue.path;
157+
osparc.store.Data.getAllItems(locationId, path)
158+
.then(items => {
159+
if (items && items.length) {
160+
const file = items.find(item => item.path === outValue.path);
165161
if (file) {
166162
resolve(file["file_meta_data"]);
167163
return;

0 commit comments

Comments
 (0)