cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: Downloading a file

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Fri, 27 Nov 2009 12:28:08 -0600

On Nov 27, 2009 at 4:50 AM, Paul Monteiro wrote:

> Do you think it is possible to check the size after download ?

Check the size of what?

If you mean the size of the downloaded file, see:
CURLINFO_SIZE_DOWNLOAD

If you mean the size of the file on the server, see:
CURLOPT_NOBODY and CURLINFO_CONTENT_LENGTH_DOWNLOAD

Also note that you might be able to append the remaining data to
the local file by using the CURLOPT_RESUME_FROM or CURLOPT_RANGE
options, but this could result in corruption if the remote file
gets replaced between requests, I'm not sure if CURLOPT_FILETIME
and CURLINFO_FILETIME would help in this case, since the file
keeps changing on the server anyway, either by being replaced or
appended.

- Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-27

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET