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_UP‐
12       LOAD_T,
13                                  curl_off_t *content_length);
14

DESCRIPTION

16       Pass a pointer to a curl_off_t to receive the specified size of the up‐
17       load. Stores -1 if the size isn't known.
18

PROTOCOLS

20       All
21

EXAMPLE

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

AVAILABILITY

41       Added in 7.55.0
42

RETURN VALUE

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

SEE ALSO

48       curl_easy_getinfo(3),        curl_easy_setopt(3),         CURLINFO_CON‐
49       TENT_LENGTH_DOWNLOAD_T(3),
50
51
52
53libcurl 7.76.1                 November 04,C2U0R2L0INFO_CONTENT_LENGTH_UPLOAD_T(3)
Impressum