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_CON‐
12       TENT_LENGTH_UPLOAD_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
17       upload. 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, "http://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.71.1                  March 23, 20C2U0RLINFO_CONTENT_LENGTH_UPLOAD_T(3)
Impressum