Make it work with React Native
Opened this issue · 4 comments
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?
This is the discussion @HriBB is referring to.
@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.
@thebigredgeek Seems ok. You suggest to do this in 1 repo, or multiple (i.e. using lerna
, as @HriBB suggested)?
Guys writing a snippet of my thoughts here.
Get in touch soon.