diff --git a/packages/file-handling/src/vpu-fileupload.js b/packages/file-handling/src/vpu-fileupload.js index 7f387b544531997fb2f7ad6211b1f2603bacb6df..05ac18c0840f5fe696b560a1a9be123da37cfb4b 100644 --- a/packages/file-handling/src/vpu-fileupload.js +++ b/packages/file-handling/src/vpu-fileupload.js @@ -108,12 +108,6 @@ class VPUFileUpload extends VPULitElement { fileElem.value = ''; } - async asyncForEach(array, callback) { - for (let index = 0; index < array.length; index++) { - await callback(array[index], index, array); - } - } - async handleFiles(files) { console.log('handleFiles: files.length = ' + files.length); @@ -121,7 +115,7 @@ class VPUFileUpload extends VPULitElement { { "detail": {}, bubbles: true, composed: true })); // we need to wait for each upload until we start the next one - await this.asyncForEach(files, async (file) => this.uploadFile(file)); + await commonUtils.asyncArrayForEach(files, async (file) => this.uploadFile(file)); this.dispatchEvent(new CustomEvent("vpu-fileupload-all-finished", { "detail": {}, bubbles: true, composed: true })); diff --git a/packages/file-handling/vendor/common b/packages/file-handling/vendor/common index 5aa64ec47e7b65d69327f4dec1102917fe33bd22..4f1d5c504ad5935b8903ab37abcbaa2b588112bd 160000 --- a/packages/file-handling/vendor/common +++ b/packages/file-handling/vendor/common @@ -1 +1 @@ -Subproject commit 5aa64ec47e7b65d69327f4dec1102917fe33bd22 +Subproject commit 4f1d5c504ad5935b8903ab37abcbaa2b588112bd