how download little part of big file in delphi? (like download manager)
for example, suppose want first 300 bytes of 100mb text file on http.
getting first 300 bytes of 100mb file.
using wininet library can specify in parameters how many bytes beginning of file need.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385103.aspx
in case later want chunk in-between may investigate 3rd-party libraries. libraries need set http request range
header - https://en.wikipedia.org/wiki/list_of_http_header_fields
there no online http://www.overbyte.be/eng/products/ics.html maybe in sources find support it.
there numeric properties in http://synapse.ararat.cz/doc/help/httpsend.thttpsend.html#rangestart
there string property in http://www.indyproject.org/docsite/html/tidrequestheaderinfo_range.html
tidhttp.request
object.
however server may ignore header. library choose should check if server retirned content-range
in http response , if did not. maybe download file start or maybe throw exception. should test libraries , understand behaviour in such case.
Comments
Post a Comment