Files should be read and uploaded in binary mode
@@ -109,7 +109,7 @@ def _upload(auth_http, project_id, bucket_name, file_path, object_name, acl):
object_name: The name within the bucket to upload to.
acl: The ACL to assign to the uploaded file.
"""
- with open(file_path, 'r') as f:
+ with open(file_path, 'rb') as f:
data = f.read()
content_type, content_encoding = mimetypes.guess_type(file_path)
