Skip to content

Instantly share code, notes, and snippets.

@wildfrontend
Created July 15, 2020 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wildfrontend/32bf2dd4293db5eae4f9592099b44b41 to your computer and use it in GitHub Desktop.
Save wildfrontend/32bf2dd4293db5eae4f9592099b44b41 to your computer and use it in GitHub Desktop.
blobToDataURI
function blobToDataURI(blob, callback) {
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = function (e) {
callback(e.target.result)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment