Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This package is good for React Native ? #76

Open
thanhhuy12th opened this issue Mar 24, 2018 · 5 comments
Open

This package is good for React Native ? #76

thanhhuy12th opened this issue Mar 24, 2018 · 5 comments

Comments

@thanhhuy12th
Copy link

Hi,

I'm working with Node js (Server) and React Native (client), this package is good for React Native?

@sffc
Copy link
Owner

sffc commented Mar 27, 2018

I have not tried this with React Native. As long as React Native is compatible with the ECMAScript standard, particularly the part regarding FileList and FileReader, then this package should work fine.

Do you mind updating us on your progress if you decide to implement it? 😄

@PatrissolJuns
Copy link

@sffc It seems like this package does not work with react-native since you've used document which is not defined in the React-Native world:

ReferenceError: Can't find variable: document _dispatch _baseFileSelectCallback

@sffc
Copy link
Owner

sffc commented Feb 7, 2021

This package only uses document when dealing with events, such as document.createEvent. This was written before CustomEvent was standardized; I imagine React Native probably supports CustomEvent but not document.createEvent.

I'm happy to review a PR migrating document.createEvent to CustomEvent. CustomEvent is available on 98% of browsers.

@PatrissolJuns
Copy link

@sffc So finally what do you say about react-native compatibility? Because I've tried it but I got this error while trying to upload through submitFiles:

ReferenceError: Can't find variable: document _dispatch _baseFileSelectCallback

@sffc
Copy link
Owner

sffc commented Feb 8, 2021

According to your error message, it seems this module doesn't support React Native. I'm happy to review a PR migrating from document.createEvent to CustomEvent if that fixes the compatibility issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants