Last active
October 17, 2017 11:44
-
-
Save haywirez/136b327c4c1eef3cac478c58bbe90faa to your computer and use it in GitHub Desktop.
Blob related utilities - download, upload, conversions...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const downloadBlob = (blob, fileName) => { | |
const a = document.createElement("a") | |
const url = window.URL.createObjectURL(blob) | |
a.href = url | |
a.download = fileName | |
a.click() | |
window.URL.revokeObjectURL(url) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment