Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/699 Co-authored-by: konrad <k@knt.li> Co-committed-by: konrad <k@knt.li>
7 lines
No EOL
213 B
TypeScript
7 lines
No EOL
213 B
TypeScript
export const downloadBlob = (url: string, filename: string) => {
|
|
const link = document.createElement('a')
|
|
link.href = url
|
|
link.setAttribute('download', filename)
|
|
link.click()
|
|
window.URL.revokeObjectURL(url)
|
|
} |