Best file picker for react native

unknown123 picture unknown123 · Mar 29, 2018 · Viewed 19.8k times · Source

I've tried react-native-file-picker, react-native-file-chooser, react-native-document-chooser etc, but none of them are working properly. Can anyone suggest me a good functional file picker for choosing files from device storage?

Answer

Pritish Vaidya picture Pritish Vaidya · Mar 29, 2018

On a personal opinion, I use react-native-document-picker.

The installation and the usage is well mentioned in their docs

Right now it supports most general use cases required for file upload

  • All type of Files 'public.allFiles' or DocumentPickerUtil.allFiles()
  • Only PDF 'public.pdf' or DocumentPickerUtil.pdf()
  • Audio 'public.audio' or DocumentPickerUtil.audio()
  • Plain Text 'public.plainText' or DocumentPickerUtil.plainText()

The rest of the restrictions can be modified based upon your file type option as it provides with the following file res options

 res.uri,
 res.type, // mime type
 res.fileName,
 res.fileSize