Base code merged to SPIN 2.4
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_RESUME_FROM.3
index c61fd3b..c25c646 100644 (file)
@@ -45,10 +45,28 @@ If you need to resume a transfer beyond the 2GB limit, use
 .SH PROTOCOLS
 HTTP, FTP, SFTP, FILE
 .SH EXAMPLE
-TODO
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+  curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
+
+  /* resume upload at byte index 200 */
+  curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 200L);
+
+  /* ask for upload */
+  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+  /* set total data amount to expect */
+  curl_easy_setopt(curl, CURLOPT_INFILESIZE, size_of_file);
+
+  /* Perform the request */
+  curl_easy_perform(curl);
+}
+.fi
 .SH AVAILABILITY
 Always
 .SH RETURN VALUE
 Returns CURLE_OK
 .SH "SEE ALSO"
 .BR CURLOPT_RESUME_FROM_LARGE "(3), " CURLOPT_RANGE "(3), "
+.BR CURLOPT_INFILESIZE "(3), "