I am using Expo.FileSystem here and I have to download file from my api and save it to my Videos folder in internal storage.
I have to save the file to my videos folder and not in FileSystem.documentDirectory folder.
downloadFile(){
FileSystem.downloadAsync(
'http://www.africau.edu/images/default/sample.pdf',
FileSystem.documentDirectory + 'sample.pdf'
).then(({ uri }) => {
console.log('Finished downloading to ', uri);
})
.catch(error => {
console.error(error);
});
}
If I put any other location instead of FileSystem.documentDirectory + 'sample.pdf' then it shows this location is not writable. please help...