Loading vospace-ui-frontend/src/store.js +13 −5 Original line number Original line Diff line number Diff line Loading @@ -188,15 +188,23 @@ export default new Vuex.Store({ for (let file of files) { for (let file of files) { names.push(file.name); names.push(file.name); } } client.prepareForUpload(state.path, names) return client.prepareForUpload(state.path, names) .then(uploadUrls => { .then(uploadUrls => { let uploads = []; let uploads = []; for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) { uploads.push(client.uploadFile(uploadUrls[i], files[i])); uploads.push(client.uploadFile(uploadUrls[i], files[i])); } } Promise.all(uploads).then(() => { Promise.all(uploads) .then(() => { // Reload current node when all uploads completed // Reload current node when all uploads completed dispatch('setPath', state.path); dispatch('setPath', state.path); }) .catch(error => { let message = "Unable to upload file" if (error.response && error.response.data) { message += ": " + error.response.data; } main.showError(message); }); }); }); }); }, }, Loading Loading
vospace-ui-frontend/src/store.js +13 −5 Original line number Original line Diff line number Diff line Loading @@ -188,15 +188,23 @@ export default new Vuex.Store({ for (let file of files) { for (let file of files) { names.push(file.name); names.push(file.name); } } client.prepareForUpload(state.path, names) return client.prepareForUpload(state.path, names) .then(uploadUrls => { .then(uploadUrls => { let uploads = []; let uploads = []; for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) { uploads.push(client.uploadFile(uploadUrls[i], files[i])); uploads.push(client.uploadFile(uploadUrls[i], files[i])); } } Promise.all(uploads).then(() => { Promise.all(uploads) .then(() => { // Reload current node when all uploads completed // Reload current node when all uploads completed dispatch('setPath', state.path); dispatch('setPath', state.path); }) .catch(error => { let message = "Unable to upload file" if (error.response && error.response.data) { message += ": " + error.response.data; } main.showError(message); }); }); }); }); }, }, Loading