【发布时间】:2019-01-10 12:36:21
【问题描述】:
我想将我的本地图像更改为 blob 文件类型。如何使用 react-native-fs 来做到这一点。 这是我在下面尝试过的
RNFS.readFile('../../assets/imgs/profile.jpg', 'base64')
.then(res =>{
console.log(res);
alert("res");
});
这是我目前正在尝试的,但它给了我一个警告——“ 没有这样的文件或目录,打开'../../assets/imgs/profile.jpg'
【问题讨论】:
标签: android reactjs react-native react-native-fs