Skip to content
Snippets Groups Projects
Commit 8dd799b4 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

If you give a *_LARGE option you MUST make sure that the type of the passed-in

argument is a curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you
must make sure that to pass in a type 'long' argument. */
parent a38520c9
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,12 @@ int main(int argc, char **argv)
DLL may not use the variable's memory when passed in to it from an app
like this. */
/* and give the size of the upload (optional) */
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
/* Set the size of the file to upload (optional). If you give a *_LARGE
option you MUST make sure that the type of the passed-in argument is a
curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
make sure that to pass in a type 'long' argument. */
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)file_info.st_size);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment