I am using react native cameraroll api to save my images in storage.
CameraRoll.saveToCameraRoll(data.uri)
.then(console.log('Success', 'Photo added to camera roll!'))
.catch(err => console.log('err:', err))
Above code successfully save image in storage like (DCIM/imageName.jpg)
But i want to change the location of images to be saved somewhere else like (testfolder/1/imagename.jpg) I tried like this:
CameraRoll.saveToCameraRoll({
uri: data.uri,
album: 'test',
}, 'photo').then((newUri) => {
console.log('new location of image => ', newUri);
})
I read this link https://facebook.github.io/react-native/docs/cameraroll.html#savetocameraroll but there is no proper guide or parameter set to change location.
Anyone guide me how can i change path for saving images?