Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
dataURItoBlob(dataURI) {
// code adapted from:
let binary = atob(dataURI.split(',')[1]);
let array = [];
for (let i = 0; i < binary.length; i++) {
return new Blob([new Uint8Array(array)], {type: 'image/jpeg'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment