Search code examples
cordovaphonegap-pluginscordova-plugins

Cordova camera plugin error with destinationType option


I have a problem with the camera plugin of cordova.

When I write destinationType: Camera.DestinationType.DATA_URL or "FILE_URI" in options of getPicture(), I have this error:

[phonegap] [console.error] TypeError: Cannot read property 'DATA_URL' of undefined [phonegap] at d.e.takePicture (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:13:13609) [phonegap] at fn (eval at (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:11:32101), :2:224) [phonegap] at i (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:12:18522) [phonegap] at d.$eval (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:10:20470) [phonegap] at d.$apply (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:10:20696) [phonegap] at HTMLButtonElement. (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:12:18574) [phonegap] at HTMLButtonElement.Gt.n (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:8:30670)

If I dont write this option, camera launch correctly, but I can't have the url of the img.

Thanks


Solution

  • UsedestinationType:navigator.camera.DestinationType.DATA_URL