You can clone with
HTTPS or Subversion.
1. The last chunk of resumable upload is sent to server.
2. Full range is done and status file is deleted (this is cause of problem!)
3. Call to upload_pass back-end is performed.
4. Back-end fails temporally with negative error code, for example 502.
5. Client retries last chunk.
6. The upload module returns "201 Created" for last chunk. But?! it should call back-end again and give something other than 201, because whole file is uploaded already. However response content informs that server has got only the last chunk of uploaded file - the one uploaded by the attempt in step 5.
So the problem is removal of state file in step 2.
That should be done once dispatched action returns any positive 2xx/3xx status code (step 4). Eventually status file path could be sent to back-end as request param then back-end would take care of that file same way as uploaded content file.