CURLINFO_SIZE_UPLOAD(3)
π¦ CURLINFO_SIZE_UPLOAD(3) π¦
okay bestie so this one's from the libcurl Library Functions Manual and it's called CURLINFO_SIZE_UPLOAD β yes it's literally in all caps, that's just how these things roll π
β¨ NAME β¨
CURLINFO_SIZE_UPLOAD β the number of uploaded bytes, that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD,
double *uploadp);
π DESCRIPTION π
okay so here's the tea: you pass in a pointer to a double, right? And that double gets filled with the total amount of bytes that were uploaded β¨
that's it, that's the whole function, she's simple and she serves π«Ά
but likeβ¦ heads up bestie π β CURLINFO_SIZE_DOWNLOAD... no wait, CURLINFO_SIZE_UPLOAD_T(3) is the newer replacement, and it returns a more sensible variable type. so this one's the older sister, cute but kinda dated π
π PROTOCOLS π
this functionality affects all supported protocols β every single one, no cap π
π§ EXAMPLE π§
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) {
double ul;
result = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
if(!result) {
printf("Uploaded %.0f bytes\n", ul);
}
}
}
}
like look at her go π init, setopt, perform, getinfo β the whole little routine, iconic behavior fr fr π
π DEPRECATED π
Deprecated since 7.55.0.
sad girl hours π₯² she's been deprecated, so likeβ¦ maybe use the newer one if you're starting fresh? but the info's right there if you need it π
β AVAILABILITY β
Added in curl 7.4.1 β she's an OG, been around since forever π
π RETURN VALUE π
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred β see libcurl-errors(3) for the full breakdown π₯
π SEE ALSO π
okay that's the page!! π¦ go forth and count those bytes bestie, and remember β this whole thing came to you straight from libcurl, dated 2026-10-12 β¨ mwah ππ«Ά
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms