I'm developing ionic 3 app which can download images from firebase. images can download successfully by giving the url.
By giving a regular link to image like this
the image will be download.This is working.
but if i give a firebase storage url like https://firebasestorage.googleapis.com/v0/b/myapp.appspot.com/o/1.jpg?alt=media&token=xxx
it won't download.In console i can see the image path and when i click it will open in browser.but when i run it on android it will not download.
How can i fix this?
my code for the download
download()
{
var url = 'https://firebasestorage.googleapis.com/v0/b/myapp.appspot.com/o/1.jpg?alt=media&token=ea450d47-b12c-4bcc-9e35-c2aba22bc155'
var album = 'MyAppName';
this.photoLibrary.saveImage(url,album).then((entry=>{
console.log('download complete: ' + entry.photoURL);
this.presentToast('download complete:' + entry.photoURL);
}),
(error) => {
// handle error
this.presentToast(error);
this.loader.dismiss();
});
}
I just found that tokens are downloading but not images