I'm using react-native-document-picker to select some files.
After selecting a Google Drive file, I use the provided uri to read as base64 using RNFetchBlob.fs.readFile(fileUri, 'base64');
When reading the file I got this error
Error: Permission Denial: reading com.google.android.apps.docs.storagebackend.StorageBackendContentProvider uri content://com.google.android.apps.docs.storage/document/acc=1;doc=encoded=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX from pid=2062, uid=10288 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
And then I tried selecting another file from my local storage (from Downloads folder) and got a similar issue:
Error: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary:Download/somefile.gif from pid=25027, uid=10288 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
I'm checking for reading storage permission and it has permission...
Am i missing something?
I'm testing on a OnePlus 5T
Android 9
react-native: 0.62.2
rn-fetch-blob: 0.12.0
I'm using react-native-document-picker to select some files.
After selecting a Google Drive file, I use the provided uri to read as base64 using
RNFetchBlob.fs.readFile(fileUri, 'base64');
When reading the file I got this error
Error: Permission Denial: reading com.google.android.apps.docs.storagebackend.StorageBackendContentProvider uri content://com.google.android.apps.docs.storage/document/acc=1;doc=encoded=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX from pid=2062, uid=10288 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
And then I tried selecting another file from my local storage (from Downloads folder) and got a similar issue:
Error: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary:Download/somefile.gif from pid=25027, uid=10288 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
I'm checking for reading storage permission and it has permission... Am i missing something?
I'm testing on a OnePlus 5T Android 9 react-native: 0.62.2 rn-fetch-blob: 0.12.0