Can't use this.camera.DestinationType.NATIVE_URI?


#1

Like i said in the topic I can’t use this.camera.DestinationType.NATIVE_URI or file_uri, but data_url i can???

Anybody know’s may be my issue?

here 's my html

<ion-card>
        <ion-card-content>
          <button ion-button icon-right (click)="onTakePicture()">
            Take Picture
            <ion-icon name="camera"></ion-icon>
          </button>
          <img *ngIf="image" [src]="domSanitizer.bypassSecurityTrustUrl(image)" />
          <button ion-button color="primary" (click)="accessGallery()">Open Gallery
            <ion-icon name="galery"></ion-icon>
          </button>
          <img [src]="base64Image" *ngIf="base64Image" />
        </ion-card-content>
      </ion-card>

here’s ts

accessGallery(){

    const galleryoptions: CameraOptions = {
      sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
      destinationType: this.camera.DestinationType.NATIVE_URI,      
      quality: 100,
      targetWidth: 1000,
      targetHeight: 1000,
      encodingType: this.camera.EncodingType.JPEG,      
      correctOrientation: true

     }

    this.camera.getPicture(galleryoptions).then((imageData) => {
       this.base64Image = 'data:image/jpeg;base64,'+imageData;
       console.log('ddadada',this.base64Image);
      }, (err) => {
       console.log(err);
     });
    // this.camera.getPicture(galleryoptions)
    // .then(data_url => this.base64Image = data_url, 
    // err => console.log(err));   

      
  }```

Result:

image=?