]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_mime_data_cb.md: mention what datasize is for
authorDaniel Stenberg <daniel@haxx.se>
Thu, 31 Jul 2025 08:13:34 +0000 (10:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 31 Jul 2025 08:48:53 +0000 (10:48 +0200)
Closes #18115

docs/libcurl/curl_mime_data_cb.md

index 9404eb20e52a7c014c57703fed6d7d37a1cbaed4..9b3fdd5593bd9674d7688cdad39da44c63332369 100644 (file)
@@ -44,6 +44,8 @@ from a data read callback function.
 
 *part* is the part's to assign contents to.
 
+*datasize* is the number of bytes the read callback is expected to provide.
+
 *readfunc* is a pointer to a data read callback function, with a signature
 as shown by the above prototype. It may not be set to NULL.
 
@@ -160,8 +162,8 @@ int main(void)
     hugectl.buffer = hugedata;
     hugectl.size = sizeof(hugedata);
     hugectl.position = 0;
-    curl_mime_data_cb(part, hugectl.size, read_callback, seek_callback, NULL,
-                      &hugectl);
+    curl_mime_data_cb(part, hugectl.size, read_callback,
+                      seek_callback, NULL, &hugectl);
   }
 }
 ~~~