diff --git a/include/miniocpp/response.h b/include/miniocpp/response.h index 93fcda9..7ede8ed 100644 --- a/include/miniocpp/response.h +++ b/include/miniocpp/response.h @@ -190,6 +190,10 @@ struct CreateMultipartUploadResponse : public Response { struct PutObjectResponse : public Response { std::string etag; std::string version_id; + std::string checksumCRC32; + std::string checksumCRC32C; + std::string checksumSHA1; + std::string checksumSHA256; PutObjectResponse() = default; diff --git a/src/baseclient.cc b/src/baseclient.cc index 46032a7..30c57de 100644 --- a/src/baseclient.cc +++ b/src/baseclient.cc @@ -1384,6 +1384,10 @@ PutObjectResponse BaseClient::PutObject(PutObjectApiArgs args) { PutObjectResponse resp; resp.etag = utils::Trim(response.headers.GetFront("etag"), '"'); resp.version_id = response.headers.GetFront("x-amz-version-id"); + resp.checksumCRC32 = response.headers.GetFront("x-amz-checksum-crc32"); + resp.checksumCRC32C = response.headers.GetFront("x-amz-checksum-crc32c"); + resp.checksumSHA1 = response.headers.GetFront("x-amz-checksum-sha1"); + resp.checksumSHA256 = response.headers.GetFront("x-amz-checksum-sha256"); return resp; }