You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android xhr.upload.onprogress and addEventListener('progress') not supported? #11853
Ended up moving to a native (Obj-c and Java) solution for now which does provide upload progress events on Android.
Regarding XmlHttpRequest, not sure if the Android interface is different from iOS or not but no luck with XmlHttpRequest progress when uploading on Android.
@christopherdro Yes, I did see that last week but xhr.upload.addEventListener('progress') did not result in any updates on Android - only iOS. For now, we have solved it with a Native solution, thanks though.
Hey @dguillamot, would you mind sharing your solution? I am facing the same problem, and I currently don't have the knowledge to implement it natively (learning java but that will take me some time...).
I'm on RN=0.42 and using XHR with a Content-Length set before uploading begins. I'm seeing the progress events, but no bytesSent or length or anything else that I can use to compute a progress%. Anybody else have luck with this?
i trying to upload video with youtube v3 api, and have some dilemma. When i use FormData , xhr.upload.onprogress is working. But then youtube api return processing error, because FormData add some data to file object. So, i use something like xhr.send({uri: url}); and it works, video is uploading, BUT xhr.upload.onprogress stopped working. I still don't know why...
P.S. sorry for my ugly english
Activity
dguillamot commentedon Jan 13, 2017
Ended up moving to a native (Obj-c and Java) solution for now which does provide upload progress events on Android.
Regarding XmlHttpRequest, not sure if the Android interface is different from iOS or not but no luck with XmlHttpRequest progress when uploading on Android.
christopherdro commentedon Jan 16, 2017
@dguillamot Looks like there is some sort of API for progress on android.
https://github.com/facebook/react-native/blob/e87e181998bf4f8efba2c7e04bec0929344600b9/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.java#L190
dguillamot commentedon Jan 16, 2017
@christopherdro Yes, I did see that last week but xhr.upload.addEventListener('progress') did not result in any updates on Android - only iOS. For now, we have solved it with a Native solution, thanks though.
bogobogo commentedon Feb 16, 2017
Hey @dguillamot, would you mind sharing your solution? I am facing the same problem, and I currently don't have the knowledge to implement it natively (learning java but that will take me some time...).
GeoffreyPlitt commentedon Mar 13, 2017
I'm on RN=0.42 and using XHR with a Content-Length set before uploading begins. I'm seeing the progress events, but no bytesSent or length or anything else that I can use to compute a progress%. Anybody else have luck with this?
ranjitpandit commentedon Jun 11, 2017
Any ideas how to get send progress events on Android with bytesSent?
agu-z commentedon Jun 22, 2017
@christopherdro Why is this issue closed? This problem persists, doesn't it?
1stman commentedon Aug 30, 2017
i trying to upload video with youtube v3 api, and have some dilemma. When i use
FormData,xhr.upload.onprogressis working. But then youtube api return processing error, becauseFormDataadd some data to file object. So, i use something likexhr.send({uri: url});and it works, video is uploading, BUTxhr.upload.onprogressstopped working. I still don't know why...P.S. sorry for my ugly english
Added progress updates for all XMLHttpRequest upload types
Added progress updates for all XMLHttpRequest upload types
Added progress updates for all XMLHttpRequest upload types / fix cras…