79136927

Date: 2024-10-29 11:07:57
Score: 8 🚩
Natty:
Report link

@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?

Reasons:
  • RegEx Blacklisted phrase (2.5): can you please suggest how you
  • RegEx Blacklisted phrase (1.5): resolved?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • User mentioned (1): @Aaron
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Rachit Saxena