Closed Protino closed 2 years ago
thank you for the PR and sorry for taking so long, I needed to do https://github.com/rnmods/react-native-document-picker/commit/66efeab9774db3dcec16b13b8e987399880b5f35 first to be able to test it out :)
@vonovak @Protino I have updated 8.1.1 and I still have all the files in Android. I only want PDF and docx, but the file selector still has APK, text and other files
Summary
This PR fixes issue #513, where even after restricting file types the user could choose any file type (only in case of multiple types)
This is fixed by calling
setType
on ACTION_GET_CONTENT intent with providedmimeTypes
separated by|
Test Plan
What's required for testing (prerequisites)?
The example application is sufficient, provided the emulator/device has some example .doc and .png files
What are the steps to reproduce (after prerequisites)?
Steps to reproduce the issue -
Open picker for multi-selection of word files
optionSteps to verify the fix - Re-run the app with this commit merged, will only be able to select restricted file types.
Compatibility
Checklist
README.md