You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/21 00:57:31 UTC

[GitHub] [cordova-plugin-camera] tbaumer22 commented on issue #411: Error "No Image Selected"

tbaumer22 commented on issue #411: Error "No Image Selected"
URL: https://github.com/apache/cordova-plugin-camera/issues/411#issuecomment-485208621
 
 
   I'm getting the same error on iOS using the latest version of Xcode. I'm writing my project in Angular and using Ionic & Cordova to compile. This is my code: 
   
   `  public takePhoto() {
       const options: CameraOptions = {
         quality: 100,
         destinationType: this.camera.DestinationType.DATA_URL,
         encodingType: this.camera.EncodingType.JPEG,
         mediaType: this.camera.MediaType.PICTURE,
         sourceType: this.camera.PictureSourceType.CAMERA,
         allowEdit: false,
         correctOrientation: true  //Corrects Android orientation quirks
       };
   
       this.camera.getPicture(options).then((imageData) => {
         // imageData is either a base64 encoded string or a file URI
         // If it's base64 (DATA_URL):
         let base64Image = 'data:image/jpeg;base64,' + imageData;
         console.log(base64Image);
         this.launchPostPage(base64Image);
       }, (err) => {
         // Handle error
         console.log(err);
       });
     }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org