How get a file from my native/camera or convert the result and after upload to Firebase storage? with ionic/angular

I try to take a picture from my camera, and when i finish the edition automatically upload to my storage in Firebase storage.

But when upload the "file" i get an application/octet-stream

These is all my code.

Imports

import { Camera, CameraOptions } from "@ionic-native/camera/ngx";

Variables

  downloadURL: Observable<string>;
  captureDataUrl: string;

Constructor

constructor(
    private storage: AngularFireStorage,
    private camera: Camera
  ) {  }

Function of capture

  capture() {
      const cameraOptions: CameraOptions = {
      quality: 80,
      destinationType: this.camera.DestinationType.DATA_URL,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE,
      allowEdit: true,
    };

    this.camera.getPicture(cameraOptions).then(
      (imageData) => {
        this.captureDataUrl = "data:image/jpeg;base64," + imageData;
        this.upload();
      },
      (err) => {
        console.log(err);
      }
    );
  }

Function of upload

  upload() {
    let n = Date.now();
    const filePath = `gt/${n}`;
    const fileRef = this.storage.ref(filePath);
    var blob = new Blob([this.captureDataUrl], { type: "image/jepg" });
    var file = new File([blob], `${n}.jepg`);

    const task = this.storage
      .upload(`gt/${n}`, file)
      .snapshotChanges()
      .pipe(
        finalize(() => {
          this.downloadURL = fileRef.getDownloadURL();
          this.downloadURL.subscribe((url) => {
            if (url) {
              console.log(url);
            }
          });
        })
      )
      .subscribe(
        (uploadTask) => {
          if (uploadTask) {
            console.log("Working...");
          }
        },
        (error) => {
          if (error) {
            console.log(error);
          }
        }
      );