I have a React-Native project and I need to read the data from a file which is on Internet, so, I need to read the data from the URL or download the file, read it and then delete the file.
Can anyone help me?
Thank you.
I have a React-Native project and I need to read the data from a file which is on Internet, so, I need to read the data from the URL or download the file, read it and then delete the file.
Can anyone help me?
Thank you.
Share Improve this question asked Mar 15, 2017 at 9:29 Adam SanchoAdam Sancho 1872 gold badges3 silver badges13 bronze badges2 Answers
Reset to default 2For native filesystem managing (creation of local files, deletion etc) you could use this module, https://github./johanneslumpe/react-native-fs
For downloading/uploading you could either use the react native fetch
https://facebook.github.io/react-native/docs/network.html
or the above fs module.
React Native provides the Fetch API for your networking needs. Fetch will seem familiar if you have used XMLHttpRequest or other networking APIs before. You may refer to MDN's guide on Using Fetch for additional information.
https://facebook.github.io/react-native/docs/network.html