React native 如何将React本机Fetch Blob Blob转换为base64/Image
我正在尝试使用React Native Fetch Blob将图像存储在Firebase.Storage中,我终于在存储中获得了一些内容,但存储中的文件现在是完全无意义的/压缩数据,我无法真正用于任何用途 如何将blob转换回BASE64或image,以便在应用程序中使用该映像 ` `React native 如何将React本机Fetch Blob Blob转换为base64/Image,react-native,react-native-fetch-blob,React Native,React Native Fetch Blob,我正在尝试使用React Native Fetch Blob将图像存储在Firebase.Storage中,我终于在存储中获得了一些内容,但存储中的文件现在是完全无意义的/压缩数据,我无法真正用于任何用途 如何将blob转换回BASE64或image,以便在应用程序中使用该映像 ` ` 代码基于此项目下面的代码将URL转换为base64图像 RNFetchBlob.fetch("GET", "ImageURL").then(resp => { base64image.push(
代码基于此项目下面的代码将URL转换为base64图像
RNFetchBlob.fetch("GET", "ImageURL").then(resp => {
base64image.push("data:image/png;base64," + resp.data);
console.log(base64image); // -> your base64 image
});
RNFetchBlob.fetch("GET", "ImageURL").then(resp => {
base64image.push("data:image/png;base64," + resp.data);
console.log(base64image); // -> your base64 image
});