当我尝试设置正在进行的react-native项目时,其中一个插件是react-native-fetch-blob
,我会尝试很多,但无法解决此问题。
我也从应用程序中删除了该插件,并从npm react-native-fetch-blob
重置了所有步骤在完成所有步骤后都出现相同的问题。
`RNFetchBlob.fetch('POST', 'api', {
'Content-Type': 'application/multipart/form-data'
}, [
{name: 'file', filename: filename, data: RNFetchBlob.wrap(PictureURI)}
])
.then((responseData) => {
// console.log("image uploaded",responseData);
// console.log("----------Upload Image Test---RESPONSE---------");
})
.catch(err => {
// console.log(err);
// console.log("----------Upload Image Test---RESPONSE--ERROR-------");
})`
在此插件中,我仅使用了fetch方法,但我的项目给了我错误的mkdir方法。
答案 0 :(得分:0)
Resolve this issue following steps:
react-native unlink react-native-fetch-blob
npm uninstall react-native-fetch-blob --save
yarn add react-native-fetch-blob (assuming your system already
installed yarn)
RNFB_ANDROID_PERMISSIONS=true react-native link
then uninstall app from device/simulator/emulator and run command
react-native run-android
work perfect.
:)