cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problem with file upload using CURLFORM_BUFFER

From: Henry Ludemann <misc_at_hl.id.au>
Date: Wed, 27 Jul 2011 11:46:56 +0800

Hi,

The commit in f851f768578dc096c561d57ba07ffd1004d504c0
(CURLFORM_STREAM: acknowledge CURLFORM_FILENAME) broke uploading using
CURLFORM_BUFFER / CURLFORM_BUFFERPTR.

For example, using something like;

  curl_httppost *curlPost = 0, *last = 0;
  curl_formadd(&curlPost, &last,
          CURLFORM_COPYNAME, "somename",
          CURLFORM_BUFFER, "somefile.txt",
          CURLFORM_BUFFERPTR, "blah blah",
          CURLFORM_BUFFERLENGTH, 9,
          CURLFORM_END);

I'd expect the upload to include the filename, but since
f851f768578dc096c561d57ba07ffd1004d504c0 the filename is no longer
present.

Cheers,
Henry
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-27