cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Posting large files

From: Gross, Tim (Utility Computing Architect) <tim.gross_at_hp.com>
Date: Fri, 25 Sep 2009 15:21:52 +0000

 

> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Daniel Stenberg
> Sent: Friday, September 25, 2009 5:29 AM
> To: libcurl development
> Subject: Re: Posting large files
>
> On Fri, 25 Sep 2009, Gross, Tim (Utility Computing Architect) wrote:
>
> > What I would like to do is transfer it in chunks.
>
> > I am fairly certain that the server is expecting an HTTP Post.
>
> Perhaps then like...
>
> http://curl.haxx.se/libcurl/c/post-callback.html
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

Daniel,
Thanks for the pointer to this sample program. I have one question about setting the CURLOPT_POSTFIELDSIZE_LARGE option, which I think is preferable if I am posting the contents of a large file. Should the parameter curl_easy_setopt() be the size of the data transferred with each call to the read_callback function, or the total size? If I am reading in the content from a file, maybe this should be the size of the file.

I am not sure what effect setting the CURLOPT_POSTFIELDSIZE_LARGE really has. I have read the documentation, but it is not clear. Does this set the maximum number of bytes to transfer?
Thanks,
Tim.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-09-25