const b64toBlob = async (b64Data, contentType = 'application/octet-stream') => {
    const url = `data:${contentType};base64,${b64Data}`;
    const response = await fetch(url);
    const blob = await response.blob();
    return blob;
};

// https://stackoverflow.com/a/36183085/1167442