plupload-backends icon indicating copy to clipboard operation
plupload-backends copied to clipboard

python example does not handle chunking correctly

Open graingert opened this issue 11 years ago • 2 comments

This code ignores the chunk number for values greater than 0.

individual chunks should be saved to individual destinations, then joined once all chunks exist. Upload requests could arrive in any order!

graingert avatar Oct 21 '13 09:10 graingert

Hi

The chunk number is used to resume downloads.

Since the client currently only uses one connection and sends chunks in sequence, they are just appended to one destination file at the server side; making the code need only read the uploaded data once.

If there were multiple connections I agree.

-- Jakob

jakobadam avatar Nov 13 '13 07:11 jakobadam

HTTP is a stateless protocol, each request should be treated independently, using only one connection at a time is not part of the public interface to the PLupload client it's just an implementation detail.

graingert avatar Nov 13 '13 09:11 graingert