YandexDisk::Uploader
Uploads a local file to the Disk, in resumable chunks when it is large.
Files at or below chunk_size go up in a single PUT. Larger ones are
split and sent with Content-Range, so a connection that drops at 9 GB
of a 10 GB dump only costs the chunk in flight, not the whole transfer.
The one thing that cannot be resumed is an expired link: upload URLs are
valid for 30 minutes and the upload host keeps no state across them, so
a refresh restarts the file from byte 0. Sizing chunk_size so a chunk
comfortably fits in that window is what keeps that from happening.
Constants
Upload links live for 30 minutes; refresh early rather than race it.
How many times a whole file may be restarted on a fresh link.
Statuses the upload host answers with once a link is no longer usable.