cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re:Re: How to partial upload a file to server?

From: dong <ilovedxq_at_163.com>
Date: Mon, 12 May 2014 09:16:29 +0800 (CST)

Typical usage:

Send a PUT request to /chunked_upload with the first chunk of the file without setting upload_id, and receive an upload_id in return.
Repeatedly PUT subsequent chunks using the upload_id to identify the upload in progress and an offset representing the number of bytes transferred so far.
After each chunk has been uploaded, the server returns a new offset representing the total amount transferred.
After the last chunk, POST to /commit_chunked_upload to complete the upload.

At 2014-05-11 22:00:38,"Daniel Stenberg" <daniel_at_haxx.se> wrote:
>On Sun, 11 May 2014, dong wrote:
>
>> I'm coding a Dropbox client in C. I use libcurl to chunked upload a file
>> to Dropbox. Every time I want to upload 4MB of the file to Dropbox. But I
>> don't know how to do this.Should I use CURLOPT_CHUNK_BGN_FUNCTION,
>> CURLOPT_SEEKFUNCTION, or some else options of libcurl?
>
>Can you be more specific about what the "chunked upload" is in HTTP terms? A
>PUT using chunked content-encodoing?
>
>--
>
> / daniel.haxx.se
>-------------------------------------------------------------------
>List admin: http://cool.haxx.se/list/listinfo/curl-library
>Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-12