(url: string, filename: string)
| 134 | * @param filename The desired name for the downloaded file. |
| 135 | */ |
| 136 | export const downloadImage = (url: string, filename: string) => { |
| 137 | const link = document.createElement('a'); |
| 138 | link.href = url; |
| 139 | link.download = filename; |
| 140 | document.body.appendChild(link); |
| 141 | link.click(); |
| 142 | document.body.removeChild(link); |
| 143 | }; |
no outgoing calls
no test coverage detected