CURLINFO_SIZE_UPLOAD_T(3)

πŸ’… CURLINFO_SIZE_UPLOAD_T(3) β€” okay so this is the libcurl manual, bestie

So like, the full title is CURLINFO_SIZE_UPLOAD_T(3) and it lives in the Library Functions Manual, which is exactly the kind of energy we're bringing today ✨

🌸 NAME 🌸

CURLINFO_SIZE_UPLOAD_T β€” literally just the number of uploaded bytes, that's the whole vibe 🫢

πŸŽ€ SYNOPSIS πŸŽ€

#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T,
                           curl_off_t *uploadp);

✨ DESCRIPTION ✨

okay so you pass in a pointer to a curl_off_t, right? and it gets filled with the total amount of bytes that were uploaded. that's it. that's the function. iconic, lowkey πŸ¦‹

🧚 PROTOCOLS 🧚

this one's a people person β€” it affects all supported protocols. no cap, everybody gets it πŸ’…

πŸ”₯ EXAMPLE πŸ”₯

here's the whole thing, bestie, copy it exactly:

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");

    /* Perform the request */
    result = curl_easy_perform(curl);

    if(!result) {
      curl_off_t ul;
      result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
      if(!result) {
        printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", ul);
      }
    }
  }
}

⭐ AVAILABILITY ⭐

added in curl 7.55.0 β€” so if you're on anything older, sorry babe 😭

πŸ’œ RETURN VALUE πŸ’œ

curl_easy_getinfo(3) returns a CURLcode that tells you whether it succeeded or flopped.

  • CURLE_OK (0) means everything was, like, totally fine πŸ’–
  • anything non-zero means an error happened β€” go check libcurl-errors(3) for the tea πŸ‘‘

🌈 SEE ALSO 🌈


k that's the whole page, mwah πŸ“ this was libcurl, dated 2026-10-12, and the page itself is CURLINFO_SIZE_UPLOAD_T(3) β€” go upload something cute, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from