Cannot read property 'DATA_URL' of undefined Camera plugin


#1

Hi , i’m facing a little issue , with the plugin Camera when i try to add some options

getpic() { let options = { quality : 75, destinationType : Camera.DestinationType.DATA_URL, sourceType : Camera.PictureSourceType.CAMERA, // Camera.PictureSourceType.PHOTOLIBRARY allowEdit : false, encodingType: Camera.EncodingType.JPEG, popoverOptions: CameraPopoverOptions, targetWidth: 500, targetHeight: 500, saveToPhotoAlbum: false }; Camera.getPicture(options).then((imageData) => { // imageData is either a base64 encoded string or a file URI // If it's base64: let base64Image = "data:image/jpeg;base64," + imageData; console.log('Success'); }, (err) => { }); }

anyone can help me?


#2

Change these values to:

navigator.camera.DestinationType.DATA_URL

(all of them, not just the DATA_URL)


#3

Many thanks josh its working