react-native-fileupload
react-native-fileupload copied to clipboard
[Android] Error happened: Precondition Failed
Hi!
I'm trying to upload an image on android with this code:
var obj = {
uploadUrl: config.API_URL + 'images',
method: 'POST',
headers: {
...config.HEADERS,
'Authorization': 'Bearer ' + this.userToken
},
fields: {
'one': 'two'
},
files: [
{
name: 'file',
filename: 'avatar.jpg',
filepath: this.avatarSource.uri
}
]
};
FileUpload.upload(obj, (function (err, result) {
//err === 'Error happened: Precondition Failed'
}).bind(this));
And I'm receiving this error. Do you have any ideas why does it happen?
Thanks!
hey @PhilippKrone , the same error occurred on Android (IOS works fine). Could you please help with issue?
+1
same