curl-library
RE: Uploading a file via HTTP Post
From: Allen Pulsifer <pulsifer3_at_comcast.net>
Date: Sun, 1 Jul 2007 09:07:29 -0400
Date: Sun, 1 Jul 2007 09:07:29 -0400
Have you tried simply setting those two headers, using something like:
struct curl_slist *headers;
headers = curl_slist_append(headers, "Content-Disposition: form-data;
name=\"upload_file\"; filename=\"filename.torrent\"");
headers = curl_slist_append(headers, "Content-Type:
application/octet-stream");
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
...
curl_slist_free_all(headers);
Received on 2007-07-01