cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem in posting filename=""

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 11 Dec 2008 23:08:24 -0800

On Fri, Dec 12, 2008 at 12:18:35PM +0530, rakesh.sharma2_at_wipro.com wrote:
> Actually when I am trying the following curl_formadd,
> And then seeing the debug file, the form which is sent by curl
> application has nothing like

Like what? And you still haven't said what it *does* give you.

> That means curl has not made any form with null file name like in
>
> Content-Disposition: form-data; name="name:_id11"; filename=""
> Content-Type: application/octet-stream
>
>
> Then, I tried with
> curl_formadd(&formpost,
> &lastptr,
> CURLFORM_COPYNAME, "CarFinderForm:_id11",
> CURLFORM_FILE,"",
> CURLFORM_FILENAME,"",
> CURLFORM_CONTENTTYPE ,"application/octet-stream",
> CURLFORM_END);
> But it is giving me the error that filename is NULL

You probably need to give it a filename then. Either "nul:" or "/dev/null"
depending on the platform should work (assuming you want to send an empty
part).

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-12-12