cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: progress_callback

From: Christian Vogt <christian.vogt_at_loewe-komp.de>
Date: Thu, 22 Nov 2007 16:51:02 +0100

on 11/22/2007 3:08 PM, Dario Griffo wrote:
> Hi, I have a problem retrieving info when I upload files.
>
> Any idea?

Hi,

Maybe you've forgotten the CURLOPT_INFILESIZE parameter?
 From the manual:
~~~~~~~~~~~~~~~~
CURLOPT_INFILESIZE
When uploading a file to a remote site, this option should be used to
tell libcurl what the expected size of the infile is. This value should
be passed as a long. See also CURLOPT_INFILESIZE_LARGE.

For uploading using SCP, this option or CURLOPT_INFILESIZE_LARGE is
mandatory.

Note that this option does not limit how much data libcurl will actually
send, as that is controlled entirely by what the read callback returns.
~~~~~~~~~~~~~~~~

If I remember correctly, the info given with the CURLOPT_INFILESIZE is
used to calculate the progress, because libcurl does not know how much
data you want to upload in advance.

Cheers,
   Christian
Received on 2007-11-22