From 9ac356511b2da0602a7f02ff54b30f2ab0bba07d Mon Sep 17 00:00:00 2001 From: defanor Date: Mon, 29 Jan 2024 23:38:35 +0300 Subject: Set CURLOPT_INFILESIZE on HTTP file upload --- src/rexmpp_http_upload.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/rexmpp_http_upload.c b/src/rexmpp_http_upload.c index 5d13f97..18a3302 100644 --- a/src/rexmpp_http_upload.c +++ b/src/rexmpp_http_upload.c @@ -66,6 +66,7 @@ void rexmpp_http_upload_slot_cb (rexmpp_t *s, curl_easy_setopt(ce, CURLOPT_UPLOAD, 1); curl_easy_setopt(ce, CURLOPT_READDATA, task->fh); curl_easy_setopt(ce, CURLOPT_URL, put_url); + curl_easy_setopt(ce, CURLOPT_INFILESIZE, task->fsize); rexmpp_xml_t *header = rexmpp_xml_first_elem_child(put); while (header) { -- cgit v1.2.3