curl-users
Re: Facing an issue while doing FTP download for large file size:
Date: Thu, 17 Mar 2011 12:54:05 +0000
--On 17 March 2011 18:10:53 +0530 lakshmi <lakshmi_at_dikshatech.com> wrote:
> I am trying to do FTP download using the curl API "CURLOPT_MAXFILESIZE"
> for a file which is of 400MB !
The curl library list is here:
http://cool.haxx.se/mailman/listinfo/curl-library
> Curl API is:
> curl_easy_setopt(curlHandle_m, CURLOPT_MAXFILESIZE, 3L);
>
> The following error occurs and the file doesn't get downloaded: "63
> Maximum file size exceeded"
>From the man page:
> CURLOPT_MAXFILESIZE
>
> Pass a long as parameter. This allows you to specify the maximum size (in
> bytes) of a file to download. If the file requested is larger than this
> value, the transfer will not start and CURLE_FILESIZE_EXCEEDED will be
> returned.
>
> The file size is not always known prior to download, and for such files
> this option has no effect even if the file transfer ends up being larger
> than this given limit. This concerns both FTP and HTTP transfers.
You are setting the maximum file size to 3 bytes. Is that really what
you intended? 400MB > 3 bytes.
-- Alex Bligh ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-03-17