Empty files cannot be created with MultpartUploader.
Also, when an error occurs in the MultipartUploader, the MultipartUploadAdapter will retry the upload forever. This might be useful for temporary errors like Network problems, but blocks a PHP process and creates high server load for permanent errors (like the one with the empty files)
This patch
Fixes the upload error by creating the file directly instead
Introduces a retry limit and aborts the upload if too many errors occur
I'm not sure if MAX_RETRIES = 10 is appropriate, but in my tests I didn't need a single retry even when uploading big files.
Empty files cannot be created with MultpartUploader. Also, when an error occurs in the MultipartUploader, the MultipartUploadAdapter will retry the upload forever. This might be useful for temporary errors like Network problems, but blocks a PHP process and creates high server load for permanent errors (like the one with the empty files)
This patch
I'm not sure if MAX_RETRIES = 10 is appropriate, but in my tests I didn't need a single retry even when uploading big files.