Retry upload after a broken pipe
Fix incorrect image type name