Re: Resumable Uploads

On Sat, 20 Apr 2013, Yoav Nir wrote:

> How does the server know when the whole thing has been uploaded?  Wouldn't 
> we need some kind of "total-length" header, perhaps in the initial PUT?
>
> Or are we assuming that the initial PUT is trying to upload everything, and 
> only failure leads to sending the PATCH?

The initial upload could still send "everything" that is everything for that 
particular operation at that time, and then you'd set the expected size of the 
body like always with Content-Length: (or use chunked-encoding or ...).

If you then want to append data to the remote resource, which very well could 
happen without a failure anywhere. Let's for example imagine the case where 
host A just wants to append data to a logfile on host B. It could then append 
a chunk of data every now and then.

I agree with Fredrik's statement that a simple PUT + offset header would be 
easiest for a client (and possibly server too), but I just previously quoted 
the reasoning in the spec as to why it currently doesn't think that is a good 
idea. It would be more productive if we would instead counter that argument or 
present an alternative way.

-- 

  / daniel.haxx.se

Received on Saturday, 20 April 2013 21:21:16 UTC