itinance / itinance/react-native-fs
unable to get dcim/camera files on android
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello !
I try to use react-native-fs to get files from my android gallery (in /storage/emulated/0/dcim/camera folder). I already set those android permissions :
```xml
```
and I try to access the file with this code :
```js
async componentDidMount() {
const path = RNFS.ExternalStorageDirectoryPath + '/dcim/camera';
console.log('Document Path : ', path);
const dir = await RNFS.readDir(path);
console.log('DIR : ', dir);
}
```
Unfortunally, I don't succeed to retrieve the files. Here is the log :
```
LOG Document Path : /storage/emulated/0/dcim/camera
LOG DIR : []
```
If I try to list the /dcim files it works well :
```
LOG Document Path : /storage/emulated/0/dcim
LOG DIR : [{"ctime": null, "isDirectory": [Function isDirectory], "isFile": [Function isFile], "mtime": 2022-06-20T14:46:24.000Z, "name": "Camera", "path": "/storage/emulated/0/dcim/Camera", "size": 53248}, {"ctime": null, "isDirectory": [Function isDirectory], "isFile": [Function isFile], "mtime": 2021-05-03T00:04:15.000Z, "name": ".thumbnails", "path": "/storage/emulated/0/dcim/.thumbnails", "size": 24576}, {"ctime": null, "isDirectory": [Function isDirectory], "isFile": [Function isFile], "mtime": 2020-01-24T01:45:31.000Z, "name": ".tmfs", "path": "/storage/emulated/0/dcim/.tmfs", "size": 3488}, {"ctime": null, "isDirectory": [Function isDirectory], "isFile": [Function isFile], "mtime": 2022-06-21T12:55:14.000Z, "name": "Screenshots", "path": "/storage/emulated/0/dcim/Screenshots", "size": 118784}
```
Do you have some ideas why I can't retrieve camera files ?
Many thanks =)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.