How to get Absolute Path of the file ?
See original GitHub issueHey Guys, I have already resolved this issue for me. I have posted the solution in this link Absolute Path Solution
RNFetchBlob.fs
.stat(res.uri) // Relative path obtained from document picker
.then(stats => {
console.log(stats);
var str1 = "file://";
var str2 = stats.path;
var correctpath = str1.concat(str2);
this.setState({ absolutepath: correctpath });
})
.catch(err => {
console.log(err);
});
** Enable read/write permission** Do Test it and reply if it works !
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:32
Top Results From Across the Web
How to get full path of a file? - linux - Stack Overflow
Holding Shift and right clicking on a file in Windows Explorer gives you an option called Copy as Path . This will copy...
Read more >File getAbsolutePath() method in Java with Examples
The getAbsolutePath() method is a part of File class. This function returns the absolute pathname of the given file object.
Read more >How to view or copy the full path of a folder or file. | Sony USA
Click the Start button and then click Computer, click to open the location of the desired file, hold down the Shift key and...
Read more >Get the Full Path of a File in Linux - Baeldung
Firstly, we use the dirname command to find the directory in which a file is located. Then we change the directory using the...
Read more >How to Find Full Path of a File in Linux
Get Absolute File Path in Linux · Use readlink to get file path · Use realpath to get full file path · Use...
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
@ElangoPrince I got error on RNFetchBlob.fs.stat(res.uri) // failed to stat path
null
because it does not exist or it is not a folder@cybercoder It should be. I don’t know the exact code you should use. Other people have said that using FormData and the URI are enough (search other issues). But even if that doesn’t work all that should be necessary is to
fetch(...)
thecontent://
URI, this will let you get aBlob
. And that Blob can be used when uploading.