cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FIle size

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Thu, 29 Nov 2007 09:12:55 -0600

On Nov 29, 2007 8:56 AM, Barthold, Robert <RBarthold_at_heiler.com> wrote:

> how can i get the file size of a file that i want to download, BEFORE i
> download the file. I didn't find any options or paramters.

Set CURLOPT_NOBODY before you call curl_easy_perform(),
and then check CURLINFO_CONTENT_LENGTH_DOWNLOAD
with curl_easy_getinfo() afterwards.

 - Jeff
Received on 2007-11-29