GNURLINFO...H_UPLOAD_T(3)
π NAME π
Okay bestie, welcome to the GNURLINFO...H_UPLOAD_T(3) page from the curl_easy_getinfo options manual β and it's all about CURLINFO_CONTENT_LENGTH_UPLOAD_T, which gets the specified size of the upload. π
β¨
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle,
CURLINFO_CONTENT_LENGTH_UPLOAD_T,
curl_off_t *content_length);
π DESCRIPTION π
Pass a pointer to a curl_off_t to receive the specified size of the upload. It stores -1 if the size isn't known. No cap, that's the whole vibe. π«Ά
π PROTOCOLS π
All β every protocol, no gatekeeping. π
π¦ EXAMPLE π¦
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Perform the upload */
res = curl_easy_perform(curl);
if(!res) {
/* check the size */
curl_off_t cl;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
if(!res) {
printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\n", cl);
}
}
}
β AVAILABILITY β
Added in 7.55.0 β she's been iconic for a minute. π
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Simple, clean, slay. β¨
πΈ SEE ALSO πΈ
This iconic page is brought to you by libcurl 7.55.0 and 25 May 2017 β GNURLINFO...H_UPLOAD_T(3) out, bestie π
π«Άπ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms