diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py index 205d4aeb2..04ad78e0e 100644 --- a/google/cloud/storage/blob.py +++ b/google/cloud/storage/blob.py @@ -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 @@ -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