RNFetchBlob.fetch('POST', 'http://xyz.com//addFile', {
'token': AppStorage.getToken(),
'userid': AppStorage.getUserId(),
'Content-Type' : 'multipart/form-data',
}, [
// element with property `filename` will be transformed into `file` in form data
// { name : 'avatar', filename : 'avatar.png', data: binaryDataInBase64},
// custom content type
//{ name : 'avatar-png', filename : 'avatar-png.png', type:'image/png', data: binaryDataInBase64},
// part file from storage
{ name : 'file', filename : 'avatar-foo.jpeg', type:'image/jpeg', data: RNFetchBlob.wrap(photo.path)},
// elements without property `filename` will be sent as plain text
{ name : 'counterUserId', data : this.state.chatUser.userId},
// { name : 'info', data : JSON.stringify({
// mail : 'example@example.com',
// tel : '12345678'
// })},
]).then((resp) => {
Getting issue
My code is