Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use getFileUri? #470

Open
AgNm opened this issue Apr 5, 2018 · 4 comments
Open

How to use getFileUri? #470

AgNm opened this issue Apr 5, 2018 · 4 comments

Comments

@AgNm
Copy link

AgNm commented Apr 5, 2018

screen shot 2018-04-05 at 7 16 31 pm
How can I use getFileUri given in below link. I want to get the real path of the file.

#395

I tried below code, but getting error:

        RNFS.getFileUri(uri).then(filePath =>
                alert(filePath);
              )
@annammarri
Copy link

I'm getting the same error 🙁

@andtos90
Copy link
Contributor

andtos90 commented Apr 18, 2018

getFileUri is a native function not meant to be used at javascript level. It has been introduced to support the content uri in Android and it's internally used to read and write file. For example you can use a a filepath similar to content://downloads/tmpname with the usual methods like readFile, writeFile and copyFile.

@andtos90
Copy link
Contributor

 @AgNm I've just sent #480 that expose the original file name pointed by the content uri, maybe this could be useful for you

@delavago
Copy link

delavago commented Mar 6, 2019

I am still unclear on how to get back a uri from getFileUri. is there an code example of how to use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants