
How can I use getFileUri given in below link. I want to get the real path of the file.
https://github.com/itinance/react-native-fs/pull/395
I tried below code, but getting error:
RNFS.getFileUri(uri).then(filePath =>
alert(filePath);
)
I'm getting the same error 馃檨
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.
聽@AgNm I've just sent #480 that expose the original file name pointed by the content uri, maybe this could be useful for you
I am still unclear on how to get back a uri from getFileUri. is there an code example of how to use it?
Most helpful comment
getFileUriis 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 tocontent://downloads/tmpnamewith the usual methods likereadFile,writeFileandcopyFile.