Open EyalSi opened 7 years ago
You should take a look at my PR (https://github.com/wkh237/react-native-fetch-blob/pull/546) although I haven't touch the FS part of this library.
The current implementation in this library for content URIs on Android seems to try to find the file path for a given content URIs. If the file is a virtual file or in a place your app doesn't have access to, this is problematic.
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
Good
I'm getting a content:// uri in android 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? 10x