# Firebase Upload Image not working

**URL:** <https://forum.ionicframework.com/t/firebase-upload-image-not-working/62520>\
**Category:** ionic-v3\
**Created:** [September 4, 2016, 10:22am UTC](https://forum.ionicframework.com/t/firebase-upload-image-not-working/62520 "2016-09-04T10:22:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabhorange](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@saurabhorange](https://forum.ionicframework.com/u/saurabhorange)\
**Post date:** [September 4, 2016, 10:22am UTC](https://forum.ionicframework.com/t/firebase-upload-image-not-working/62520/1 "2016-09-04T10:22:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saurabhorange](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@saurabhorange](https://forum.ionicframework.com/u/saurabhorange)\
**Post date:** [September 12, 2016, 2:35pm UTC](https://forum.ionicframework.com/t/firebase-upload-image-not-working/62520/2 "2016-09-12T14:35:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muzij](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@muzij](https://forum.ionicframework.com/u/muzij)\
**Post date:** [November 28, 2016, 10:26am UTC](https://forum.ionicframework.com/t/firebase-upload-image-not-working/62520/3 "2016-11-28T10:26:09Z")

</div>

hi. did you get a solution to this?
