Working with the following react native packages in android:
"react-native": "0.47.2"
"react-native-document-picker": "2.0.0" (removing the ovveride to compile with 0.47)
"react-native-fetch-blob": "^0.10.8"
I'm getting a content:// uri while using react-native-document-picker or react-native-contacts (for the avatars). URIs like:
'content://com.android.providers.media.documents/document/image%3A99'
Trying to access this file fails with "stat error: failed to list path null for it is not exist or it is not a folder'"
const urlDecoded = decodeURIComponent(url);
return new Promise((resolve, reject) => {
RNFetchBlob.fs.stat(urlDecoded)
.then(resolve)
.catch(reject);
});
Any idea how to access the file? access the real path of it?
There is now a solution for this problem in react-native-fs. Enabling access and copy content:// files -https://github.com/itinance/react-native-fs/pull/395
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