Handling a failed upload

The simplest way to handle a failed upload is to try to upload the file again.

If a file failed to upload because it was too big, compress it before the upload and then try to upload the .zip. Moreover, iIf a .zip file failed to upload because it was too big, split it to create several smaller .zip files and upload these.