Set Content-Type and Content-Disposition on S3 objects ; properly computes the MD5 of attachments. Retry uploads up to three times in case of failure.