cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Help w/ HTTP file upload [bug?]

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Dec 2009 22:37:26 +0100 (CET)

On Wed, 9 Dec 2009, Ryan M. Lederman wrote:

> **Actual behavior**: curl appears to call the callback in quick succession
> about 50 times, seemingly while reading the file from disk, THEN begins
> calling the progress callback at ~1sec intervals where ulnow == ultotal
> every call (apparently while actually uploading).

In current libcurl the progress callback might get called a lot more often
than once per second but it should really not be any _less_ frequent than so.

I can't see why see this behavior you describe, as the progress meter and in
fact the entire upload procedure is pretty much the same for formbased uploads
as for everything else.

Can you provide us with a small example code we can try to see if we can
repeat/explain/fix/excuse/talk away it?

> My next attempt at solving was going to be implementing manual file reading
> via curl_easy_setopt(CURLOPT_READFUNCTION).

Right, that's of course always an option but then you'll need to do a little
more magic on your own.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-12-10