1CURLINFO_CONTENT_LENGTH_UPLOcAuDr_lT_(e3a)sy_getinfoCUoRpLtIiNoFnOs_CONTENT_LENGTH_UPLOAD_T(3)
2
3
4

NAME

6       CURLINFO_CONTENT_LENGTH_UPLOAD_T - get the specified size of the upload
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T,
12                                  curl_off_t *content_length);
13

DESCRIPTION

15       Pass a pointer to a curl_off_t to receive the specified size of the up‐
16       load. Stores -1 if the size is not known.
17

PROTOCOLS

19       All
20

EXAMPLE

22       CURL *curl = curl_easy_init();
23       if(curl) {
24         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
25
26         /* Perform the upload */
27         res = curl_easy_perform(curl);
28
29         if(!res) {
30           /* check the size */
31           curl_off_t cl;
32           res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
33           if(!res) {
34             printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
35           }
36         }
37       }
38

AVAILABILITY

40       Added in 7.55.0
41

RETURN VALUE

43       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
44       if not.
45

SEE ALSO

47       curl_easy_getinfo(3),         curl_easy_setopt(3),        CURLINFO_CON‐
48       TENT_LENGTH_DOWNLOAD_T(3),
49
50
51
52libcurl 7.85.0                   May 17, 202C2URLINFO_CONTENT_LENGTH_UPLOAD_T(3)
Impressum