itinance / itinance/react-native-fs
ENOENT: no such file or directory, open
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm using [react-native-document-picker](https://github.com/rnmods/react-native-document-picker) in order to pick an audio file.
After this i'm using `RNFS.readFile(nft.teaser.url, 'base64')` to obtain a base64 that should be upload in a blob.
The problem is that RNFS.readFile throws an exception:
```
Error: ENOENT: no such file or directory, open '/Users/xxx/Library/Developer/CoreSimulator/Devices/F21F02D1-2AEE-4DDE-A5DA-B8EEE28073FB/data/Containers/Data/Application/C33F0FAE-C0F5-429A-9CCB-FF7A5E586381/tmp/yyyy-Inbox/file_example_MP3_700KB%20(1).mp3'
at fn (NativeModules.js:99)
at readFileGeneric (FS.common.js:160)
at Object.readFile (FS.common.js:310)
at _callee4$ (VM13 actions.bundle:194)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:293)
at Generator.next (runtime.js:118)
at tryCatch (runtime.js:63)
at invoke (runtime.js:154)
at runtime.js:189
```
It's strange because the path I pass to readFile begins with "files//" and in exception looks like this part was removed from the path.
Any help would be appreciated.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.