我需要将图像从相机胶卷上传到s3,并且当前使用RNfetchblob和buffer来实现此目的。但问题是此过程将UI挂起了几秒钟,而我似乎对此没有任何解决方案。我的代码如下:
RNFetchBlob.fs
.readFile(url, "base64")
.then(res => {
const buffer = new Buffer(res, "base64");
//the above codes makes the UI unresponsive for few seconds or milliseconds
//rest of the code to upload the data
});
有人对此有何建议?