Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
blob to dataurl, because I keep forgetting how to do it!
function blobToDataURL(blob) {
return new Promise((fulfill, reject) => {
let reader = new FileReader();
reader.onerror = reject;
reader.onload = (e) => fulfill(reader.result);
Copy link

backspaces commented May 15, 2018

Superb! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment