curl-library
Re: Problem with HTTP file upload using libcurl
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 17 Nov 2003 11:09:20 +0100 (CET)
Date: Mon, 17 Nov 2003 11:09:20 +0100 (CET)
On Mon, 17 Nov 2003, Pravin Jade wrote:
> I want to upload a file to Apache 2.0.46 server with Tomcat 4.1.24 as
> servlet container using libcurl APIs. I am using HTTP protocol for this and
> Windows 2000 OS.
Are you using libcurl as a DLL?
> /* now specify which file to upload */
> curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
... if you are, then you will not be successful until you read up on the
READDATA option (the CURLOPT_INFILE option is named CURLOPT_READDATA these
days) (*)
If you are using libcurl as DLL, you must use a READFUNCTION callback.
If you aren't, then I need you to figure out how and where it bails out.
(*) = http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTREADDATA
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not post private mails to this email address. They won't reach me. ]] ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmplReceived on 2003-11-17