Hi please help me I would like to select an image in the gallery of my phone and when I try it does not work, see my code thank you.
selectImage(): Promise<any> {
return new Promise(resolve => {
let cameraOptions: CameraOptions = {
sourceType: this._CAMERA.PictureSourceType.PHOTOLIBRARY,
destinationType: this._CAMERA.DestinationType.DATA_URL,
quality: 100,
targetWidth: 320,
targetHeight: 240,
encodingType: this._CAMERA.EncodingType.JPEG,
correctOrientation: true
};
this._CAMERA.getPicture(cameraOptions)
.then((data) => {
this.cameraImage = "data:image/jpeg;base64," + data;
resolve(this.cameraImage);
});
});
}