I've tried to restrict file types that can be selected by Expo.DocumentPicker.getDocumentAsync, but without success.
How to filter many mimeTypes at once?
I already tried as follow:
Expo.DocumentPicker.getDocumentAsync({type: "image/*;application/pdf"});
and
Expo.DocumentPicker.getDocumentAsync({type: "image/*,application/pdf"});
and
Expo.DocumentPicker.getDocumentAsync({type: ["image/*","application/pdf"]}); //CRASH
I'm using sdk 27.0.0.
Some suggestion? Expo team? :}
Reference: https://docs.expo.io/versions/latest/sdk/document-picker#type-string----the-mime-type-of
expo-document-picker now accepts an array of MIME types like
getDocumentAsync({type: ["image/*","application/pdf"]});
Refer: this documentaiton
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With