react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 437 forks source link

Even specify the type as "image", I still pick video #598

Closed EricaLi123 closed 6 months ago

EricaLi123 commented 1 year ago

Bug report

Even specify the type as "image", I still pick video

Reproducible sample code

DocumentPicker.pick({ type: 'image/*', }) .then((res) => { console.log(res); })

Steps to reproduce

https://user-images.githubusercontent.com/58462179/199378845-55cfa9a0-37ed-41ad-a072-d02436d39cba.mp4

Describe what you expected to happen:

  1. Other types of files are invisible
  2. Or visible but not optional

Environment info

react-native : 0.66.3 Harmony OS: 2.0.0 react-native-document-picker": "^8.1.2",

surethink commented 1 year ago

same issue

it seems that the type parameter not take effect, I give the accepted types, but still pick other type of file successfully DocumentPicker.pickSingle({ type: [ DocumentPicker.types.plainText, DocumentPicker.types.pdf, DocumentPicker.types.zip, DocumentPicker.types.csv, DocumentPicker.types.doc, DocumentPicker.types.docx, DocumentPicker.types.ppt, DocumentPicker.types.pptx, DocumentPicker.types.xls, DocumentPicker.types.xlsx, ], })

Environment info react-native : 0.70.6 IOS:14.0 react-native-document-picker": "^8.1.3",

faheem-cmd commented 10 months ago

@EricaLi123 Updated to the latest version was solved my issue

vonovak commented 6 months ago

Same as #706