diff --git a/google/cloud/storage/blob.py b/google/cloud/storage/blob.py index b1e13788d..301671aec 100644 --- a/google/cloud/storage/blob.py +++ b/google/cloud/storage/blob.py @@ -1611,7 +1611,8 @@ def _do_multipart_upload( headers, object_metadata, content_type = info base_url = _MULTIPART_URL_TEMPLATE.format( - hostname=self.client._connection.API_BASE_URL, bucket_path=self.bucket.path + hostname=self._require_client(client)._connection.API_BASE_URL, + bucket_path=self.bucket.path ) name_value_pairs = [] @@ -1780,7 +1781,8 @@ def _initiate_resumable_upload( headers.update(extra_headers) base_url = _RESUMABLE_URL_TEMPLATE.format( - hostname=self.client._connection.API_BASE_URL, bucket_path=self.bucket.path + hostname=self._require_client(client)._connection.API_BASE_URL, + bucket_path=self.bucket.path ) name_value_pairs = []