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?
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.
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
DocumentPickerUtil.allFiles()
DocumentPickerUtil.pdf()
DocumentPickerUtil.audio()
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
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