I am developing a React Native application for learning purposes. What I am trying to do now is that I am trying to convert the file path to the URL of a file that is downloaded from the remote server. I am using react-native-fetch-blob package to download file.
This is my code
downloadFile = () => {
RNFetchBlob.config({
fileCache: true,
})
.fetch('GET', 'https://static.standard.co.uk/s3fs-public/thumbnails/image/2016/05/22/11/davidbeckham.jpg?w968', {
})
.then((res) => {
this.setState({
avatarSource: {
uri: res.path()
}
})
})
}
res.path()
value is something like this:
How can I convert it to a URI?