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

Make it work with React Native #8

Open
HriBB opened this issue Dec 8, 2016 · 4 comments
Open

Make it work with React Native #8

HriBB opened this issue Dec 8, 2016 · 4 comments

Comments

@HriBB
Copy link
Owner

HriBB commented Dec 8, 2016

As @guilhermedecampo said, this does not work with RN, because it relies on FileList check, which is not available on RN.

You guys have a suggestion to make it easy/seamless using react-native?

Since we just create an object for the file-upload the check logic does not fit because it relies on FileList / File instanceof as you can see here https://github.com/HriBB/apollo-upload-network-interface/blob/master/src/UploadNetworkInterface.js#L21 and here https://github.com/HriBB/apollo-upload-network-interface/blob/master/src/UploadNetworkInterface.js#L47.

Thanks!

I don't use RN yet, so I have absolutely no idea on how to support this. @guilhermedecampo any ideas?

@sandervanhooft
Copy link
Collaborator

This is the discussion @HriBB is referring to.

@thebigredgeek
Copy link
Collaborator

@sandervanhooft @HriBB we should probably implement some sort of "adapter" construct for browser vs native that abstracts away the file input type and presents a unified object for transport over Form data.

@sandervanhooft
Copy link
Collaborator

@thebigredgeek Seems ok. You suggest to do this in 1 repo, or multiple (i.e. using lerna, as @HriBB suggested)?

@guilhermedecampo
Copy link

Guys writing a snippet of my thoughts here.
Get in touch soon.

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

4 participants