react-native-camera / react-native-camera

A Camera component for React Native. Also supports barcode scanning!

Home Page:https://react-native-camera.github.io/react-native-camera/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to save the image to specified path

Yasir12598 opened this issue · comments

According to the RNCAMERA documentation to save image.

rn doc

Now, as I am trying to save the captured image to the download directory

const takePicture = async function (camera) {
   const options = {
     quality: 0.5,
     path: '/storage/emulated/0/Download',
   };
   const data = await camera.takePictureAsync(options);
    };

but it gives this and nothing saves to the download directory
errror

Issue resolved you should provide file name at the end of of path like---- path: '/storage/0/download/image.jpg'