I am using React Native (0.48.3) for Android development. I seem to be stuck in a really trivial task: select a file and read it as a string. I have response-native-document-picker v2.0.0 to select a file, and it works fine: I can select the file and get its URI. The problem is that I can not make any package to read the file from this link. I already tried react-native-filesystem and react-native-fs , but it seems that they can only work with files in the application directory. Anyway, I get an error message:
Error: File was not found: content://com.android.providers.downloads.documents/document/7
Which package or feature do I need to use?
UPD: finding the real, not content:// path, with react-native-get-real-path makes everything work. But is this conversion really necessary, is it possible to use the path content:// to upload files?
source share