Download image by firebase storage url

I’m developing an app that download images by giving the links.

if i use link like this it will be downloaded.

But if i used firebase downloadUrl

it won’t downloaded.

but if i use the this firebase link directly it shows the picture.

Whats wrong with the url??

It should work. There’s some issue in your code.

1 Like

I think it is a problem with Photolibrary Pluging.Then I Used transfer plugin.And again it wont downloaded.But in the template its working. So i used this project and rebuild on it.Now everything working.Files are downloading but can’t findout where.

How to set a custom location to download.

downloadImage(image) {

this.platform.ready().then(() => {

  const fileTransfer: TransferObject = this.transfer.create();

  const imageLocation = **Any Url Here**;, this.storageDirectory + image).then((entry) => {

    const alertSuccess = this.alertCtrl.create({
      title: `Download Succeeded!`,
      subTitle: `${image} was successfully downloaded to: ${entry.toURL()}`,
      buttons: ['Ok']


  }, (error) => {

    const alertFailure = this.alertCtrl.create({
      title: `Download Failed!`,
      subTitle: `${image} was not successfully downloaded. Error code: ${error.code}`,
      buttons: ['Ok']