Hi, i am using react native fetch blob for uploading image in backend(hapijs),
The plugin, when used in android version 6 works pretty well, but when it comes to use in android version 5 , it throws up an error ("File descriptor closed") & moreover it tends to take up a lot of time to upload the form data
issue i am facing ==> File descriptor closed console.warn @ YellowBox.js:78
RNFetchBlob.fetch('POST', BACKEND_URL+"/api/User/imageUpload", {
'Content-Type' : 'multipart/form-data',
}, [
{ name: 'imageLink', filename: 'AE1E52F0-8522-44D5-8603-21FB4EC9EAF9.jpg', type: 'image/jpeg', data: RNFetchBlob.wrap(this.state.profilePicURL) }
]).then((resp) => {
const response = JSON.parse(resp.data);
if(response.statusCode == 200){
this.setState({
profilePicURL: response.data.profileUrl
})
this.EditProfile(this.state.profilePicURL)
}
}).catch((err) => {
this.setState({error: err})
})
this.state.profilePicURL ==> file:///storage/ext_sd/DCIM/100MEDIA/IMAG0495.jpg
Also some time i am gettting this issue RNFetchBlob error when sending request : failed to connect to /localhost (port 8004) after 60000ms: isConnected failed: ETIMEDOUT (Connection timed out)
And also this one read failed: EBADF (Bad file descriptor) YellowBox.js:78
Any help on this ? or the react native fetch blob is unstable and unable to perform. I testing my app on latest android version 6,7 NOw problem i am facing is sometime it's throw error that
Plz take a look in this issue.