📅  最后修改于: 2022-03-11 14:48:26.635000             🧑  作者: Mango
You can do it by using FileReader as follows:
convertBlobToBase64 = (blob) => new Promise((resolve, reject) => {
const reader = new FileReader;
reader.onerror = reject;
reader.onload = () => {
resolve(reader.result);
};
reader.readAsDataURL(blob);
});
const base64String = await convertBlobToBase64(blob);