itinance / itinance/react-native-fs

Content URI directory support

Open
#1,074 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

When I pick a single file, it works fine:
```javascript
const res = await DocumentPicker.pick();
const content = await fs.readFile(res[0].uri);
// good
```
When I pick a directory, it does not work:
```javascript
const res = await DocumentPicker.pickDirectory();
const dirs = await fs.readDir(decodeURIComponent(res.uri)); // decode the uri or it will throw a unsupported error
// not worked, throw a error: Permission Denial...ACTION_OPEN_DOCUMENT...
```

I see the same problem in this [PR](https://github.com/itinance/react-native-fs/pull/395#issuecomment-355013695), but I don't konw how to do.

Environments:
```
Android 8.0
react-native@0.66.0
react-native-fs@2.18.0
react-native-document-picker@7.1.1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.