[Owncloud] Chunked Upload Problem
Klaas Freitag
freitag at owncloud.com
Mon Jun 3 09:51:32 UTC 2013
Hi,
here is something all clients (also the Webinterface-Client) should
think about when they use chunked upload.
As you might know the chunked upload "protocol" [1] we agreed on uses a
http header to indicate that chunked upload is in progress.
Problems happen if there are proxies or whatever gangsters on the way
between client and server that filter out these headers without further
notice. Than the server has no chance to detect that chunked upload is
in progress.
With the sync client we have found a way to detect that: If there are
more than one chunk and the server returns an etag after the first
chunk, that can mean two things:
a) The server does not see the chunk header and created that file with
the chunk name, which is the error.
b) The server already knew all parts and the one transmitted was the
last missing. Thats cool and no file with the chunk filename is created.
If that happens, we send an DELETE request on the chunk file name. If
that succeeds we have the error condition and can not do chunking. If
the remove fails, we have case b) and all is fine.
If we had the server returning the header it would have been easier, but
to late now. Maybe next time.
best,
Klaas
[1] https://github.com/owncloud/core/wiki/spec:-big-file-chunking
More information about the Owncloud
mailing list