1

I am trying to download an image from a url. For this I added a 'download' parameter in my url. So I just have to call this url with window.open to download it. It works but my problem is that it opens a new tab and closes it automatically. I would like no tab to open. Is there a parameter to add so that it does what I want?

public downloadImageJpeg(instanceUID: string, format: string): string 
{
  let url = this.getRootUrl() + mode=download`;
  console.log('url', url);
  window.open(url);
  return url;
}
Floriane
  • 315
  • 6
  • 20

0 Answers0