I use the following piece of HTML to let a user download documents from the server:
<tr *ngFor="let document of documents">
<td><a href="/api/file/GetDocumentById?id={{document.id}}" download="{{document.name}}">{{document.name}}</a></td>
</tr>
Here, the download attribute sets the name of the downloaded file. This works in Chrome, but I just discovered that when using Edge, the file gets the name of the controller (GetDocumentById) instead.
Does anyone have an easy solution that sets the name of the downloaded file correctly?