curl-library
RE: Problems with CURLFORM_FILE?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Oct 2006 23:29:27 +0200 (CEST)
Date: Fri, 20 Oct 2006 23:29:27 +0200 (CEST)
On Fri, 20 Oct 2006, Urban Johansson wrote:
> I added an extra \ to the CURLFORM_FILE and also set a name and added an
> extra curl_formadd() for a field that contains the filename. When I execute
> the code both curl_formadd() returns 0, but it still looks like the server
> never receives the file.
By your use of "looks like", it doesn't sound like you're debugging this
properly. I'd suggest you use CURLOPT_DEBUGFUNCTION to properly see *exactly*
what libcurl sends to the server as then you won't have to guess anymore.
Here's a useful example showing how it can be done:
http://curl.haxx.se/lxr/source/docs/examples/debug.c
Another option is to simply "wireshark" the network and see!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-10-20