Back to product page

Resume property


Determines if wodHttpDLX will try to resume downloads.

Type

A Boolean value

Syntax

  • Basic
object.Resume [= value]
The Resume(object,value) syntax has these parts:
objectAn expression evaluating to an object of type HttpRequest.
valueA Boolean value.

Remarks

Resume property determines if wodHttpDLX will try to retrieve remote resource partially - starting from nonzero position. Typically, you will use this property is you Aborted previous download.

If you set this property, you should also point Response.Filename property to partially downloaded file that should be resumed. wodHttpDLX will check size of local content and send appropriate headers ('Range' header, to be precise) with the request. You should set this property before you call Get method.

If server supports partial content, it will return Response.StatusCode 206. Content will be appended to your local file in that case. Progress event will be fired during download, but will not start from 0 - it will actually start from previously aborted position.

It is possible that Response.Length property shows invalid information when Resume is used. It will contain total number of bytes that will be received, and usually you are interested to see size of remote resource. You can use Progress event and it's argument Total to determine size of the resource, or you can check its size when it's completely retrieved.

If server respond with StatusCode 416 (invalid download range), this usually means that local file is larger than remote one. Servers typically send full resource to the client in such cases. However, wodHttpDLX will abort the download in this case (so your local file is not overwritten). You can download resource again, but you need to set Resume=False thus allowing local file to be overwritten.

Warning: not all servers allow resume feature. It is possible that server sends full resource back - overwriting your old one.

Platforms

Windows