cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLFORM_BUFFER vs CURLFORM_PTR

From: Mohun Biswas <m_biswas_at_mailinator.com>
Date: Sun, 03 Sep 2006 10:06:06 -0400

OK, here is a patch to curl_formadd. I've attached both a context diff
and a full copy, both gzipped.

As far as I know the only significant changes are to:

1. Make clear which options go with which others.
2. Italicize the terms "name" and "filename" when referring to the part
fields.
3. Clarify that CURLFORM_FILE basenames the filename.

One other thing - I added language to clarify that CURLFORM_FILECONTENT
does not make the part a file upload part. Please check me on that
because it's just my interpretation of the existing documentation.

Daniel Stenberg wrote:
> On Thu, 31 Aug 2006, Mohun Biswas wrote:
> I think it is a decent solution that the default is basenamed, but you can set
> whatever you want with the FILENAME option.

(As usual) you were right the first time. The above is exactly what
curl_formadd already does: if you simply use CURLFORM_FILE you get the
default (basename) behavior but CURLFORM_FILENAME will let you override
that with any string. Only the documentation was lacking here and I've
tried to clarify it in the patch.

MB

Received on 2006-09-03