Firebase Upload Image not working


#1
console.log('taking pic');

  Camera.getPicture({
      destinationType: Camera.DestinationType.FILE_URI,
      sourceType: Camera.PictureSourceType.CAMERA,
      targetWidth: 640,
      correctOrientation: true
}).then((imageData) => {

 imageData = "file://" + imageData


console.log(imageData);


 window.resolveLocalFileSystemURL(imageData, (fileEntry) => { 


 console.log(fileEntry);

 fileEntry.file((resfile)=>{
 
   console.log(resfile);

   var reader = new FileReader();
 reader.onloadend = (evt: any) => {
   var imgBlob: any = new Blob([evt.target.result], { type: 'image/jpeg' });
imgBlob.name = 'sample.jpg';

console.log('blob created0');

this.firebase.uploadPhotoFromFile(imgBlob,(snapshot)=>{

  console.log(snapshot);


});


 }


 })

 })



 



})
 

}

  

In the above code , everything within onloadend never gets called , and I dont get any error.Can anyone help with this?
Thanks


#2

I have now realized my window.resolveLocalFileSystemURL callback is also not getting fired, Its really weird


#3

hi. did you get a solution to this?