Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best file picker for react native [closed]

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?

like image 776
unknown123 Avatar asked Mar 29 '18 05:03

unknown123


People also ask

How do you pick file in react native?

Setting up react-native-document-picker , a native document picker window appears. The user then selects a document from the device, and the local URI of the selected file is displayed on the screen. To implement this, install the react-native-document-picker library by installing the npm dependency.


1 Answers

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 
like image 188
Pritish Vaidya Avatar answered Oct 20 '22 16:10

Pritish Vaidya