What goes wrong
An upload over 20 MB fails for good when the connection stalls for more than ten seconds.
The client sends the file in one request. When that request times out the whole upload is thrown away, and the user starts again from zero.
Proposed fix
- Send the file in parts of 5 MB
- Retry a failed part up to three times, waiting longer each time
- Keep finished parts for an hour so a reload can resume
How to check it
Throttle the network to 200 kbit/s, upload fixtures/large.bin and pull the cable for fifteen seconds.