export function dataURItoBlob(base64Data) {
var byteString;
byteString = window.atob(base64Data.split(‘,’)[1]);
var mimeString = base64Data.split(‘,’)[0].split(‘:’)[1].split(‘;’)[0];
var ab = new ArrayBuffer(byteString.length)
var ia = new Uint8Array(byteString.length);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ia], {
type: mimeString
});
}