curl-library
Re: curl_formadd and file uploads
Date: Sun, 14 Apr 2002 16:03:52 -0600
On Sun, Apr 14, 2002 at 09:39:20AM +0200, Daniel Stenberg wrote:
>
> We should add some file-is-present checks to the CURLFORM_FILE and
> CURLFORM_FILECONTENT code.
>
> You up to providing a patch for this?
Actually I was thinking that curl needs error checking in (I believe) Curl_getFormData, which does the actual reading from the file. You'd probably have to percolate the error all the way back to curl_easy_perform and add some new CURLE_ error types for the various I/O things that could go wrong.
That's assuming curl doesn't do this somewhere already...
> It is actually kind of unnecessary. It allows you to specify a "normal"
> formpart that gets its contents from a file. So instead of using
> CURLFORM_PTRCONTENTS or CURLFORM_COPYCONTENTS, you can tell libcurl to read
> the contents off a file instead, using CURLFORM_FILECONTENT.
I see. That could be useful in some cases.
-- Craig Davison SecurityFocus (403) 213-3939 ext. 228Received on 2002-04-15