Giter VIP home page Giter VIP logo

Comments (10)

benjreinhart avatar benjreinhart commented on September 27, 2024

What version of react native are you using? I know in the past they had not supported upload progress in their XMLHttpRequest abstraction for android, which prompted me to add this guard when trying to add a progress callback. That guard was also present in their examples of using XMLHttpRequest.

from react-native-aws3.

gbau avatar gbau commented on September 27, 2024

Thanks for the quick response! I'm using 0.26.3. Tried to skim the release notes for recent react native versions, but are they supporting XHR upload progress on Android now?

from react-native-aws3.

benjreinhart avatar benjreinhart commented on September 27, 2024

It looks like they should per their android example in master.

I can try to take a look later but my project is iOS only so I haven't had to use this on android yet. I would expect this library to work on android though, since it's not view related and uses RN's abstractions like XMLHttpRequest which should work the same on iOS and android.

In the meantime, this library is pretty small and it should be straightforward to add some logging to see if your function is being set on this._xhr.upload.onprogress here.

from react-native-aws3.

gbau avatar gbau commented on September 27, 2024

Awesome! Appreciate the feedback and this library you've created!

from react-native-aws3.

benjreinhart avatar benjreinhart commented on September 27, 2024

Ohh another thing I'd try is to run the examples from your current version of RN. Try to run that android example I linked to and see if all is working there. If it is, then you'll know for sure that XMLHttpRequest is working as expected and we'll have to figure out what is going wrong here.

from react-native-aws3.

joelwass avatar joelwass commented on September 27, 2024

It doesn't work on android, you should update the README to iOS only since it hasn't been tested and currently doesn't work for Android.

I'll work on my own branch and send a PR

from react-native-aws3.

benjreinhart avatar benjreinhart commented on September 27, 2024

@joelwass can you provide any insight into what is not working? This library makes use of standard RN APIs that are supposed to work across iOS and android. So in theory, it should be working for both.

Is the file upload making it to AWS? Is the response handling broken? Nothing working? What version of RN are you on? Is it just the progress method that isn't working, like what this PR was intended for? If not can you open a separate issue with as much detail as you can provide?

Thanks

from react-native-aws3.

joelwass avatar joelwass commented on September 27, 2024

There is no response, i'm working on error handling because you don't catch an error on the xml request. The xhr has an error but it's not being caught.... from my debugging it's because android does file URI differently, so a file path in iOS won't work for Android. At least that's my theory, i'm still digging

from react-native-aws3.

MrHubble avatar MrHubble commented on September 27, 2024

@joelwass were you able to get this working on Android? If yes, could you please provide your solution?

from react-native-aws3.

saikiranoptisol avatar saikiranoptisol commented on September 27, 2024

@joelwass is it working in andorid kindly help I got struck with this very badly

from react-native-aws3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.