1

I have used RNCamera in my project but I don't know where is it saved in the cache. How can I preview the image and delete the image. The app is taking a lot of cache memory in my android phone.

2 Answers2

1

From the documentation

uri: (string) the path to the image saved on your app's cache directory.

 takePicture = async() => {
    if (this.camera) {
      const options = { quality: 0.5, base64: true };
      const data = await this.camera.takePictureAsync(options);
      console.log(data.uri);//print uri for image saved
    }
  };
0

You can check images in the gallery if not you predefined file location.

Please check takePicture = async function() from following source which returns data.uri and you have full control to move your file and the display images as well as you can delete.

https://github.com/react-native-community/react-native-camera/blob/master/docs/RNCamera.md
Abu Sufian
  • 991
  • 1
  • 6
  • 15
  • how to define the location of the image saved? they shows the location of the cache and I cannot find where exactly the images are saved – Anish Maharjan Jan 04 '20 at 15:19