Can't spot any obvious problem, try uploading a small file and comparing it to the original with a hex editor to get a hint where and in what way it gets corrupted.