Fix build

This commit is contained in:
Peter Maquiran
2021-08-23 17:17:07 +01:00
parent c9620bfff3
commit 8ded45b400
2 changed files with 23 additions and 2 deletions
@@ -271,6 +271,27 @@ export class NewPublicationPage implements OnInit {
} }
} }
getPicture() {
const options: CameraOptions = {
quality: 90,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
targetWidth: 720,
targetHeight: 720,
}
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;
this.capturedImage = imageData;
this.capturedImageTitle = new Date().getTime() + '.jpeg';
}, (err) => {
/* console.log(err); */
});
}
close(){ close(){
this.goBack(); this.goBack();