mirror of
https://github.com/curl/curl.git
synced 2026-06-27 13:15:37 +03:00
David J Meyer's large file support.
This commit is contained in:
parent
41c6f68d94
commit
b60e0fa97e
27 changed files with 290 additions and 130 deletions
|
|
@ -73,7 +73,7 @@ int main(int argc, char **argv)
|
|||
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
|
||||
|
||||
/* and give the size of the upload (optional) */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
|
||||
|
||||
/* Now run off and do what you've been told! */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
|
|
@ -85,9 +85,8 @@ int main(int argc, char **argv)
|
|||
/* now specify which file to upload */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
|
||||
|
||||
/* and give the size of the upload, make sure that we don't accidentally
|
||||
pass a larger variable type than "long". */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE, (long) file_info.st_size);
|
||||
/* and give the size of the upload */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
|
||||
|
||||
/* Now run off and do what you've been told! */
|
||||
res = curl_easy_perform(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue