curl-library
Re: Problems with CURLFORM_FILE?
From: Brian Dessent <brian_at_dessent.net>
Date: Fri, 20 Oct 2006 03:39:53 -0700
Date: Fri, 20 Oct 2006 03:39:53 -0700
> Urban Johansson wrote:
> curl_formadd(&opost, &olast, CURLFORM_FILE,
> "c:\test.jpg",CURLFORM_END);
If you want a literal backslash in a C string constant you have to use
"\\". "\t" is the tab character (and also \n, \r, etc) so the above
string literal is 'c' ':' TAB 'e' 's' 't' ... which is not likely to be
a valid filename. You could also use "c:/test.jpg" as the Windows API
is perfectly fine with the forward slash as path separator.
Brian
Received on 2006-10-20