Skip to content

Commit

Permalink
Files should be read and uploaded in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 30, 2017
1 parent 5b378ca commit 4b33941
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/py/googlestorage/publish_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 4b33941

Please sign in to comment.