hello,
my ts file is:
Download() {
const fileTransfer: FileTransferObject = this.transfer.create();
if (this.plt.is('android')) {
this.storageDirectory = cordova.file.externalDataDirectory;
}
const url = 'https://s7.dosya.tc/en2.php?a=server17/b0lra0/Atiye3.mp4&b=b0a413791d17f4a78d45dcd9536fcc5b';
this.file.createDir(this.storageDirectory, 'my_downloads', true).then(response => {
//const fileTransfer: TransferObject = this.transfer.create();
alert('directory created: ' + JSON.stringify(response));
fileTransfer.download(url, this.storageDirectory + '/my_downloads/Atiye11.mp4').then((entry) => {
alert('file download response' + JSON.stringify(entry));
this.url2 = entry.toURL()
this.normUrl = this.webview.convertFileSrc(this.url2)
})
.catch((err) => {
alert('error in file download' + JSON.stringify(err));
});
}).catch(err => {
alert('Could not create directory "my_downloads" ' + JSON.stringify(err));
});
}
my html file is :
<ion-button (click)="Download()">İndir</ion-button>
<video width="100%" height="240" controls>
<source src="{{normUrl}}" type="video/mp4">
</video>
the output is file downloaded but i can’t access the file. how can i access it ?