cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: file size limit upon posting

From: Alan Wolfe <alan.wolfe_at_gmail.com>
Date: Thu, 9 Aug 2007 09:56:02 -0700

Sounds suppiciously like an unsigned 32 bit int is being used for a
file length somewhere (perhaps even in your own code!) because the
maximum number a uint32 can store is aprox 4 million (:

On 8/9/07, Robby Blackwood <beefymanus_at_yahoo.com> wrote:
> Hi all. I recently built an app with libcurl 7.15.5. The app was used to transfer files using HTTP and worked just fine.... until I started trying files with sizes approaching 4mb. When I tried transferring files this large, all of a sudden I started getting a return error of CURLE_SEND_ERROR. I was using the form method instead of the upload file method because I also wanted to send other post data. The code is below:
>
> curl_formadd(&formpost,
> &lastptr,
> CURLFORM_COPYNAME, "sendfile",
> CURLFORM_FILE, "myfile.txt",
> CURLFORM_END);
> curl_formadd(&formpost,
> &lastptr,
> CURLFORM_COPYNAME, "command",
> CURLFORM_COPYCONTENTS, "upload",
> CURLFORM_END);
>
> curl_easy_setopt(http_handle, CURLOPT_HTTPPOST, formpost);
>
>
> I've tried putting the file into a buffer first and using the buffer size options, as well as both postfield size options, nothing works, they all fail when the file size is too large (~4mb). Anyone have any clue as to whats going on here? If I have to use the upload file option, I'd really like send the other post data as well somehow. Thanks.
>
> Rob
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545433
>
Received on 2007-08-09