-
-
Notifications
You must be signed in to change notification settings - Fork 239
Description
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
If a download task is cancelled via the DownloadTask::cancel() method, it would be really helpful if the Downloader would trigger a callback once the task is actually cancelled, in order to do some clean-up, similar to how onTaskProgress/onTaskError etc. are handled.
Also, partially downloaded files seem to not be deleted, with the .tmp and .tmp.digest remaining. It would be good to have an option to clean up these files via the Downloader. Perhaps even update the DownloadTask::cancel() method to be DownloadTask::cancel(bool cleanup = false); to keep existing behavior by default, but cleanup to true if the temporary files should be deleted.
Describe alternatives you've considered
Additional context