1
0
mirror of https://github.com/minio/minio-cpp.git synced 2025-07-30 05:23:05 +03:00

allow checksum headers in single PutObject() (#184)

This commit is contained in:
Harshavardhana
2025-01-05 16:12:18 +05:30
committed by GitHub
parent 818d2036ac
commit b8ebbf30e5
2 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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;
}