I'm working on a project where I need to download large files using Background downloader. The url generated from a server for downloadable file will expire every few hours. So if the download is not completed within the session the server will send 403 response. My question is there any way to resume the download from where it left by generating a new link from server using Background transfer API ?
Here is the code I'm using to download
try
{
StorageFile file = await folder.CreateFileAsync("Ubuntu.iso", CreationCollisionOption.ReplaceExisting);
string Url = WebUtility.HtmlDecode("http://somedomain.com/files/ubuntu.iso?session=v0iAPtjB%2fu%2bvTjiqlFtvuhF0e46RTF4dQYXJW0lIHW0%3d&ts=1493640124);
downloadOperation = backgroundDownloader.CreateDownload(new Uri(Url), file);
Progress<DownloadOperation> progress = new Progress<DownloadOperation>(progressChanged);
cancellationToken = new CancellationTokenSource();
await downloadOperation.StartAsync().AsTask(cancellationToken.Token, progress);
}
catch(Exception ex)
{
//handle exceptions
}