Some bugfixes for server errors 413 and others resulting in lost upload of data

Some bugfixes for server errors 413 and others resulting in lost upload of data. ping me if questions or concerns as you know this much better than I do