How to access internal storage using Expo.FileSystem to save file in any directory that i wish?

Viewed 1089

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://192.168.1.7:4200/video',
      FileSystem.documentDirectory + 'yellow.mp4'
    ).then(({ uri }) => {
       console.log('Finished downloading to ', uri);
      })
     .catch(error => {
        console.error(error);
     });
 }

If I put any other location instead of FileSystem.documentDirectory + 'yellow.mp4' then it shows this location is not writable. please help...

0 Answers
Related