async download(image: string) { | |
const result = await fetch(`data:image/png;base64,${image}`); | |
const blob = await result.blob(); | |
const a = document.createElement('a'); | |
a.href = URL.createObjectURL(blob); | |
a.download = name; | |
document.body.appendChild(a); | |
a.click(); | |
document.body.removeChild(a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment