Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume download with a different URL #136

Closed
UrbanCMC opened this issue Apr 24, 2023 · 2 comments · Fixed by #141
Closed

Resume download with a different URL #136

UrbanCMC opened this issue Apr 24, 2023 · 2 comments · Fixed by #141
Assignees
Labels
enhancement New feature or request
Projects

Comments

@UrbanCMC
Copy link

I'm currently trying to integrate your library into a project I'm using, but some of the URLs that are used are generated through an API that gives them an expiration date.

Would it be possible to extend the DownloadFileTaskAsync method to accept a new URL in addition to the download package, or do you foresee any problems with this?

@hankb299
Copy link

Sure I will. What do I need to do exactly?

@bezzad bezzad added the enhancement New feature or request label Apr 26, 2023
@bezzad bezzad self-assigned this Jun 6, 2023
@bezzad bezzad linked a pull request Jun 6, 2023 that will close this issue
@bezzad bezzad mentioned this issue Jun 6, 2023
@bezzad
Copy link
Owner

bezzad commented Jun 6, 2023

This feature was added to the new version 3.0.6. Please check it and add a new issue if you find a problem.

How to use:

var url =  "your_first_link_of_download_file";
var newUrl =  "your_first_link_of_download_file";

var downloader = new DownloadService(config);
await downloader.DownloadFileTaskAsync(url).ConfigureAwait(false);

// resume after canceling upper download
await downloader.DownloadFileTaskAsync(downloader.Package, newUrl); 

@bezzad bezzad closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Downloader
Awaiting triage
Development

Successfully merging a pull request may close this issue.

3 participants