Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

uploadProgress Android #120

Closed
Closed
@allvintage

Description

@allvintage

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!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions