cURL / Mailing Lists / curl-library / Single Mail


Re: Can I send only part of a file?

From: Alan Wolfe <>
Date: Mon, 9 May 2011 11:57:00 -0700

it'll truncate the uploaded file yeah, but thats what Saqib is lookin for :P

the local file that you are uploading will be untouched.

you are just lying and telling curl you reached the end of file via
the callback return, you aren't actually altering the source file.

On Mon, May 9, 2011 at 11:19 AM, Tim Bannister <> wrote:
> On 9 May 2011, at 19:12, Dan Fandrich wrote:
>> The data sent by by libcurl comes from the CURLOPT_READFUNCTION callback function which is part of your app. Once the app has finished sending all it wants, just return the end-of-file indication to libcurl (instead of more data) and it will complete the transfer.
> Won't that truncate the file? And, if it does not, won't that behaviour confuse other programmers who want the truncate behaviour?
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2011-05-09