Cannot read property 'DATA_URL' of undefined Camera plugin

Hi , i’m facing a little issue , with the plugin Camera when i try to add some options
image
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?

Change these values to:

navigator.camera.DestinationType.DATA_URL

(all of them, not just the DATA_URL)

1 Like

Many thanks josh its working