uploadProgress Android #120
Description
Hi,
thank you for this awesome project. I'm having trouble with uploadProgress on Android and couldn't find any solutions in Issues or Wiki. On iOS everything is working fine, but on Android it seems as if the uploadProgress Handler is completely being ignored.
I'm using this code to make a request to my server:
RNFetchBlob.fetch('POST', 'https://www.example.com', {
'Content-Type' : 'application/json'
}, JSON.stringify({myObject}))
// listen to upload progress event
.uploadProgress((written, total) => {
console.log('uploaded', written / total)
})
// listen to download progress event
.progress((received, total) => {
console.log('progress', received / total)
})
.then((response) => response.json())
.then((responseData) => {
console.log(responseData);
})
.catch((err) => {
console.log(err);
});
Some information that might or might not be useful:
myObject contains all necessary information to authenticate on my remote server www.example.com (which returns JSON responses) and also includes rather large base64 encoded images. Because of this uploading can take a while, therefore I want to implement an upload progress indicator.
Again, on iOS everything works like a charm. On Android the uploadProgress event handler is not even being called. The download progress event handler works fine on Android and iOS. I'm running the app without simulators on an Android Nexus Phone and iPhone 6s directly.
What am I missing?
Thank you in advance for your help!