question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get Absolute Path of the file ?

See original GitHub issue

Hey 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:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:32

github_iconTop GitHub Comments

16reactions
pk936commented, Apr 26, 2019

@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

7reactions
dantmancommented, Oct 8, 2018

@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(...) the content:// URI, this will let you get a Blob. And that Blob can be used when uploading.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found