Skip to content

Commit

Permalink
Merge pull request #268 from bucklander/bwallander_issue_266
Browse files Browse the repository at this point in the history
Fixing issue with UTF-8 conversion in Python3 for GCS uploads
  • Loading branch information
rmoriar1 committed Sep 13, 2021
2 parents 8a1f112 + c4f0eef commit f9c8c18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/gcp_storage_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def upload_file(module, client, src, dest):
try:
bucket = client.get_bucket(module.params['bucket'])
blob = Blob(dest, bucket)
with open(src, "r") as file_obj:
with open(src, "rb") as file_obj:
blob.upload_from_file(file_obj)
return blob_to_dict(blob)
except google.cloud.exceptions.GoogleCloudError as e:
Expand Down

0 comments on commit f9c8c18

Please sign in to comment.