title: html download attribute opening new tab instead of downloading file
body: <p>I have an Angular 4 website, which allows the users to download an image from an Amazon S3 bucket, to do this I use an anchor with the download attribute, but instead of downloading the image it gets opened in a new tab.
  I tested it with Firefox, Chrome and Safari.</p>
  
  <p>This is what I have in the template: </p>
  
  <pre><code>&lt;a mat-raised-button color="accent" [href]="downloadPath" download matTooltip="Download file to pc." *ngIf="isFinalReport()"&gt;
      &lt;mat-icon&gt;file_download&lt;/mat-icon&gt;
      DOWNLOAD
  &lt;/a&gt;
  </code></pre>
  
  <p>The download path is something like this: <a href="https://s3-sa-east-1.amazonaws.com/bucket-name/environment/imageName.jpg" rel="nofollow noreferrer">https://s3-sa-east-1.amazonaws.com/bucket-name/environment/imageName.jpg</a></p>
  
  <p>I have also tested it with several images from around the web and doesnt work with any, but if I use a local image (C:/Users/User/Desktop/images/image.jpg) it works perfectly.</p>
  
  <p>Any idea why this doesnt work and how to fix it?
  If you need more information please let me know.</p>
  
  <p>Thanks.</p>