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/09/03 18:11:25 UTC

[GitHub] [cordova-plugin-camera] emieuxcharles opened a new issue #497: Save with specific name and into a specific folder

emieuxcharles opened a new issue #497: Save with specific name and into a specific folder
URL: https://github.com/apache/cordova-plugin-camera/issues/497
 
 
   Hi,
   I need to save the picture a take into a specific folder with a specific name.
   Here is my code to take picture: 
   
   public takePhoto() {
       console.log('Camera Photo Click');
       const options: CameraOptions = {
         quality: 100,
         destinationType: this.camera.DestinationType.DATA_URL,
         encodingType: this.camera.EncodingType.JPEG,
         mediaType: this.camera.MediaType.PICTURE,
         saveToPhotoAlbum: true,
       }
       this.camera.getPicture(options).then((imageData) => {
       let base64Image = 'data:image/jpeg;base64,' + imageData;
   
       this.currentImage = base64Image;
       this.arrayImg.push(this.currentImage);
   
       }, (err) => {
       // Handle error
       });
     }
   
   Thanks

----------------------------------------------------------------
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