Disclaimer
I have looked at the trouble shooting page of the wiki, however I still cannot fix the problem I am having.
RN version:
react-native-cli: 2.0.1
react-native: 0.43.4
My code:
import FileUploader from 'react-native-file-uploader'
and
<Button
onPress={() => RNFetchBlob.fetch('POST', 'http://localhost:8000/upload', {
'Content-Type' : 'application/octet-stream'
}, RNFetchBlob.wrap('./tempImageStore/image.jpg'))
}
title={'Upload File'}
/>
Error I am getting:
What I did to install react-native-fetch-blob
:
1) npm install --save github:wkh237/react-native-fetch-blob-package#master
2) react-native link
Background info:
- I have tried importing it with both
import RNFetchBlob from 'react-native-fetch-blob'
andvar RNFetchBlob = require('react-native-fetch-blob').default
- I have tried installing it with the above code and also with
npm install --save react-native-fetch-blob
- I am trying this on the IOS emulator.
Thank you in advance for your help!