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

Type field is empty #170

Closed
sryze opened this issue Nov 22, 2018 · 6 comments
Closed

Type field is empty #170

sryze opened this issue Nov 22, 2018 · 6 comments

Comments

@sryze
Copy link
Contributor

sryze commented Nov 22, 2018

I'm trying to upload a file on iOS using react-native-document-picker, but it does not return the MIME type of files in the type field. I thought it was supposed to always work because this is mentioned in the README, I'm not sure if it's a bug.

Is it possible to get the file type when choosing files from iCloud Drive?

@dantman
Copy link
Collaborator

dantman commented Nov 22, 2018

Are you using v2? This is a known issue in v2 that was fixed in v3.

@sryze
Copy link
Contributor Author

sryze commented Nov 22, 2018

Yeah, I was using v2. Thanks for the suggestion. I've just installed v3 but I'm getting the same error over and over again, cleaning all build folders didn't help, any idea what's wrong?

npm install --save Elyx0/react-native-document-picker#v3
undefined is not an object (evaluating '_reactNativeDocumentPicker.DocumentPicker.show')

It appears to be the same issue as #159 (but in my case iOS instead of Android).

@dantman
Copy link
Collaborator

dantman commented Nov 22, 2018

v3 uses .pick, not .show. So that suggests that you aren't actually using the v3 JS at all, that sounds like you still have v2 JS running.

@sryze
Copy link
Contributor Author

sryze commented Nov 22, 2018

You are right, I didn't read the new README properly. Thanks, it's working now!

@sryze sryze closed this as completed Nov 22, 2018
@sryze
Copy link
Contributor Author

sryze commented Nov 22, 2018

May I ask why the menu was removed? As far as I can see in the code UIDocumentMenuViewController is no longer used but on the screenshot you show the menu. I'm a little confused. Will it be added back in a future release?

@dantman
Copy link
Collaborator

dantman commented Nov 22, 2018

UIDocumentMenuViewController is deprecated.
https://developer.apple.com/documentation/uikit/uidocumentmenuviewcontroller

iOS 11 added the Files app, and the menu picker is considered to be poor UX.

The screenshots just have not been updated. Nor has the improper way of uploading files been removed.

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

2 participants