Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add name to query parameters for blob upload #761

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions google/cloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,9 @@ def _do_multipart_upload(
if self.user_project is not None:
name_value_pairs.append(("userProject", self.user_project))

if self.name is not None:
name_value_pairs.append(("name", self.name))

# When a Customer Managed Encryption Key is used to encrypt Cloud Storage object
# at rest, object resource metadata will store the version of the Key Management
# Service cryptographic material. If a Blob instance with KMS Key metadata set is
Expand Down Expand Up @@ -2052,6 +2055,9 @@ def _initiate_resumable_upload(
if self.user_project is not None:
name_value_pairs.append(("userProject", self.user_project))

if self.name is not None:
name_value_pairs.append(("name", self.name))

# When a Customer Managed Encryption Key is used to encrypt Cloud Storage object
# at rest, object resource metadata will store the version of the Key Management
# Service cryptographic material. If a Blob instance with KMS Key metadata set is
Expand Down