RNFetchBlob.fs.mv error: source file at path {PATH} does not exists
See original GitHub issueMAY BE A BUG
When I am trying to move file from one directory to another this error is shown in console:
await RNFetchBlob.fs.mv(this.state.sourcePath, FilePicturePath() + this.state.filename);
item.js:136 Error: mv error: source file at path `file:///storage/emulated/0/Pictures/TEMP/1533659324.png` does not exists
at fs.js:256
at MessageQueue.__invokeCallback (MessageQueue.js:398)
at MessageQueue.js:137
at MessageQueue.__guardSafe (MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:136)
at debuggerWorker.js:70
but I am pretty shure file is exist, because when I run following code it prints true
let exists = await RNFetchBlob.fs.exists(this.state.sourcePath);
console.log(exists);
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
File not exists · Issue #116 · joltup/rn-fetch-blob - GitHub
Following this, i'm trying to get the content file; Using react-native-document-picker, after select the file I do this: if (Platform.
Read more >React native and rn-fetch-blob move captured image from ...
I am creating an app where the user will take a photo of the documents and save to the server. Source File at...
Read more >react-native-fetch-blob - npm
A module provides upload, download, and files access API. Supports file stream read/write for process large files.. Latest version: 0.10.8, ...
Read more >Top 5 rn-fetch-blob Code Examples - Snyk
Learn more about how to use rn-fetch-blob, based on rn-fetch-blob code examples created from the most popular ways it is used in public...
Read more >rn-fetch-blob.FS.exists JavaScript and Node.js code examples
Check if file exists and if it is a folder. FS.mkdir,; FS.readFile,; FetchBlobResponse.path,; RNFetchBlobStatic.config,; config ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are right @ihavenoface5, it was an issue of the file:// prefix.
Incorrect:
Correct:
It looks like the mv function doesn’t expect a file URI (i.e. file:///storage/emulated/0/Pictures/TEMP/1533659324.png), but instead expects a path (/storage/emulated/0/Pictures/TEMP/1533659324.png). Can you try doing the move without the file:// appended to the beginning?