this is not working properly…
downloadImage2(seletedImg) {
//URL CONTAINTS IMAGE PATH
const fileTransfer: FileTransferObject = this.transfer.create();
var url = seletedImg.filepath;
var filename = 'hello.jpg';
alert(filename);
var targetPath = this.file.externalRootDirectory + filename;
var trustHosts = true
var options = {};
// alert(cordova.file.externalRootDirectory);
fileTransfer.download(url, targetPath,trustHosts, options)
.then((result) =>{
this.validation.presentToast("File Download Successfully");
}, (error) => {
this.validation.presentToast("File Not Download");
});
}