1CURLOPT_INFILESIZE_LARGE(3)curl_easy_setopt optionsCURLOPT_INFILESIZE_LARGE(3)
2
3
4
6 CURLOPT_INFILESIZE_LARGE - set size of the input file to send off
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE_LARGE,
12 curl_off_t filesize);
13
15 When uploading a file to a remote site, filesize should be used to tell
16 libcurl what the expected size of the input file is. This value must be
17 passed as a curl_off_t.
18
19 For uploading using SCP, this option or CURLOPT_INFILESIZE(3) is manda‐
20 tory.
21
22 To unset this value again, set it to -1.
23
24 When sending emails using SMTP, this command can be used to specify the
25 optional SIZE parameter for the MAIL FROM command.
26
27 This option does not limit how much data libcurl will actually send, as
28 that is controlled entirely by what the read callback returns, but
29 telling one value and sending a different amount may lead to errors.
30
32 Unset
33
35 Many
36
38 CURL *curl = curl_easy_init();
39 if(curl) {
40 curl_off_t uploadsize = FILE_SIZE;
41
42 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
43
44 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
45
46 curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadsize);
47
48 curl_easy_perform(curl);
49 }
50
52 SMTP support added in 7.23.0
53
55 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
56 if not.
57
59 CURLOPT_INFILESIZE(3), CURLOPT_UPLOAD(3),
60
61
62
63libcurl 7.64.0 September 23, 2018 CURLOPT_INFILESIZE_LARGE(3)