fixed mimetype detection for s3 uploads