I am looping through selected files, in order to first get a signed url and then put it directly to a S3 bucket. My Problem now is, that I want to wait until everything inside the forEach has finished, and then continue looping.
What I am experiencing now is that the code directly queries for a signed url for each file at the same moment.
Thanks for any help
result['files'].forEach(file => {
this.fileService.getSignedURL(this.vehicleId, file.name, file.type, file.size)
.then(res => {
this.pushFile(file, app, description, languageKey, file.name, res.path, res.signed_url)
});
});