Comments (3)
Hi everybody,
First, make sure you set false to the ClearPackageOnCompletionWithFailure
option. Because, this option tells the Downloader to clear the package and downloaded data when the download is completed with failure, but the default value is false.
Second, before downloading, keep the downloadService.Package
in a variable;
// At first, keep and store the Package file to resume
// your download from the last download position:
DownloadPackage pack = downloader.Package;
after downloading, you can stop or pause a download or the download may be completed with an error. Therefore, when you want to resume downloading at last point, just pass the package to the downloader like this:
await downloader.DownloadFileTaskAsync(pack);
Note: Sometimes a server does not support downloading in a specific range. That time, we can't resume downloads after canceling. So, the downloader starts from the beginning.
from downloader.
In the name of GOD.
I have same as this problem. I checked DownloadService.cs codes and i knew, this class delete uncompleted download file, before start (resume) download, then continue, but i got errors for delete, so I close my project without resume.
if everybody find solution please help me.
tank you viewers and bezzad.
ممنونیم بهزاد. کاملش کل. عالیه
from downloader.
Additional info for saved your Packed, you can use json file for this:
public void SavedPacked(DownloadPackage packet, string rutaArchivo) { string json = JsonConvert.SerializeObject(packet); File.WriteAllText(rutaArchivo, json); }
public DownloadPackage ReadPacked(string rutaArchivo) { string json = File.ReadAllText(rutaArchivo); return JsonConvert.DeserializeObject<DownloadPackage>(json); }
if (File.Exists("your path .json file")) { var packed = LeerPacked("your path .json file"); Console.WriteLine("!---- OnResume ----!"); downloader.DownloadFileTaskAsync(packed); } else { Console.WriteLine("!---- OnStart ----!"); downloader.DownloadFileTaskAsync("url file to download", " your file name"); }
Use SavePacked in dDownloadProgressChanged
from downloader.
Related Issues (20)
- Chunk displaying no progress yet still downloads. HOT 1
- No error when server responds with 404 HOT 1
- Occasional resume error and inaccurate download progress HOT 2
- ipv6 Download error the ssl connection could not be established, see inner exception HOT 2
- RobiniaDocs API Explorer
- how to download stream or api link?
- Large file download blocks other download tasks. HOT 3
- Attempting to download the same file to the local directory with same name doesnt overwrite/replace HOT 2
- Downloader support socks5 proxy HOT 3
- getting error when download completed! HOT 11
- The 67th Line in this file“Downloader/src/Downloader /ChunkDownloader.cs ” is not need HOT 1
- The CancelTaskAsync interface of IDownloadService causes the program to freeze. HOT 1
- Inquiry Regarding Repository Usage for Efficient Download of Small Files in .NET HOT 1
- I need to implement happy eyeballs for IPV4 IPV6 dual stack protocol HOT 2
- Resume download after restart program
- DownloadStatus is Failed but no exception is thrown HOT 2
- README is a bit misleading about Content-Length for getting file length HOT 1
- Fix naming issue and implement IAsyncDisposable HOT 1
- How to change the URL when resume HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downloader.