File tree Expand file tree Collapse file tree
google/cloud/storage/internal/async Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,19 +150,11 @@ AsyncWriterConnectionImpl::Finalize(storage::WritePayload payload) {
150150 // Default to letting the internal hash function compute and send the checksum.
151151 auto action = PartialUpload::kFinalizeWithChecksum ;
152152
153- if (is_append || current_options.has <google::cloud::storage::UseCrc32cValueOption>() ||
154- current_options.has <google::cloud::storage::UseMD5ValueOption>()) {
153+ if (is_append || current_options.has <google::cloud::storage::UseCrc32cValueOption>()) {
155154 if (merged.has <google::cloud::storage::UseCrc32cValueOption>()) {
156155 write.mutable_object_checksums ()->set_crc32c (
157156 merged.get <google::cloud::storage::UseCrc32cValueOption>());
158157 }
159- if (merged.has <google::cloud::storage::UseMD5ValueOption>()) {
160- auto as_proto = storage_internal::MD5ToProto (
161- merged.get <google::cloud::storage::UseMD5ValueOption>());
162- if (as_proto) {
163- write.mutable_object_checksums ()->set_md5_hash (*as_proto);
164- }
165- }
166158 // For appendable uploads, the internal hash function only sees the chunks uploaded
167159 // in this stream, not the full object. We use `kFinalize` to avoid sending this
168160 // partial hash, which would otherwise fail validation.
You can’t perform that action at this time.
0 commit comments