Hello guys, I’m having a problem trying to save an image from the gallery as a file inside the device. I wanted the imageData parameter to return with the file’s photo address, but that’s not the case. See my code:
const options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.NATIVE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY
}
this.camera.getPicture(options).then((imageData) => {
//imageData returns an unexpected value
this.photo = imageData;
}, (err) => {
// Handle error
});