@Aaron McGuire I tried adding delays using set timeout in my case but it didn't work either.
private downloadMultipleFiles(boardingPassURLs : string[]): void{
boardingPassURLs.forEach((url) => {
setTimeout(() => {
this.downloadFileService.downloadFileFromURL(url).subscribe((blob) => {
const a = document.createElement('a');
const objectUrl = URL.createObjectURL(blob);
a.href = objectUrl;
a.download = 'filenameXYZ.pkpass';
a.click();
URL.revokeObjectURL(objectUrl);
});
},500);
});
this.checkinDetailsBoardingpassService.setIsBoardinpassLoaderVisible(false);
}
downloadFileFromURL(url: string) {
return this.http.get(url, { responseType: 'blob' });
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.17/angular.min.js"></script>
can you please suggest how you get it resolved? or am I doing something wrong here?