hello guys i have a problem. i want to download video file with ionic downloader and i have a problem: 1008.
the download codes:
var req: DownloadRequest = {
uri: url,
title: this.makename(10) + ".mp4",
description: element.name,
mimeType: "video/mp4",
visibleInDownloadsUi: true,
notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
destinationInExternalFilesDir: {
dirType: 'Downloads',
subPath: 'MyFile.apk'
}
};
this.dwn.download(req)
.then((location: string) => {
this.toast.presentToast('File downloaded at:' + location)
this.url2 = location;
})
.catch((error: any) => {
alert("err: " + error) ///right here i got 1008 err
});
but not everytime i got this error. i got this error sometimes. how can i fix this?