mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 07:16:15 -04:00
10 lines
191 B
TypeScript
10 lines
191 B
TypeScript
const downloadBase64File = (dataUrl: string, name = 'file') => {
|
|
const a = document.createElement('a')
|
|
a.href = dataUrl
|
|
a.download = name
|
|
a.click()
|
|
}
|
|
|
|
export {
|
|
downloadBase64File
|
|
}
|