cURL / Mailing Lists / curl-library / Single Mail

curl-library

ptr data

From: Sachin Mahajan <sachin.k.mahajan_at_gmail.com>
Date: Sun, 24 Oct 2004 22:00:50 -0600

Hi All,
I am trying to upload a multimedia buffer (not file) from my C
application to to the http server via Apache Tomcat servlet. I tried
the call as below, but dont see any data going thro to the servlet.
Which one should i use the CURLFORM_BUFFER or CURLFORM_PTRCONTENTS
versions. What is the difference between the two. Is there anything
wrong with the way I am calling the following two methods?
Thanks,
Sachin

   curl_formadd(&formpost,
                 &lastptr,
          CURLFORM_COPYNAME, "BinData",
         CURLFORM_BUFFER, "Data",
         CURLFORM_BUFFERPTR, pMValue->multiMedia->data,
                 CURLFORM_BUFFERLENGTH,(char*) dataLength,
         CURLFORM_END);

    curl_formadd(&formpost,
                 &lastptr,
         CURLFORM_COPYNAME, "BinData",
         CURLFORM_PTRNAME, "Data",
         CURLFORM_PTRCONTENTS, pMValue->multiMedia->data,
                 CURLFORM_CONTENTSLENGTH, (char*)dataLength,
         CURLFORM_END);
Received on 2004-10-25