cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Uploading problems

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 9 Aug 2006 09:54:20 -0700

On Wed, Aug 09, 2006 at 05:41:54PM +0200, Pavel Rozenblioum wrote:
> int hd = open(file, O_RDONLY) ;
> fstat(hd, &file_info);
> close(hd);

You can avoid the open/close if you use lstat() instead of fstat().

> curl_easy_setopt(curl_handle, CURLOPT_INFILESIZE_LARGE,
> file_info.st_size);

Are you sure sizeof(file_info.st_size) == sizeof(curl_off_t)? Try copying
the value into a curl_off_t, or using CURLOPT_INFILESIZE instead.

>>> Dan
Received on 2006-08-09