x-cos-hash-crc64ecma header represents the CRC64 value of a part, which you can compare against the locally calculated CRC64 value to verify the part integrity.HTTP/1.1 200 OKcontent-length: 0connection: closedate: Thu, 05 Dec 2019 01:58:03 GMTetag: "358e8c8b1bfa35ee3bd44cb3d2cc416b"server: tencent-cosx-cos-hash-crc64ecma: 15060521397700495958x-cos-request-id: NWRlODY0MmJfMjBiNDU4NjRfNjkyZl80ZjZi****
x-cos-hash-crc64ecma header represents the CRC64 value of an entire object, which you can compare against the locally calculated CRC64 value to verify the object integrity.HTTP/1.1 200 OKcontent-type: application/xmltransfer-encoding: chunkedconnection: closedate: Thu, 05 Dec 2019 02:01:17 GMTserver: tencent-cosx-cos-hash-crc64ecma: 15060521397700495958x-cos-request-id: NWRlODY0ZWRfMjNiMjU4NjRfOGQ4Ml81MDEw****[Object Content]
qcloud_cos::CosConfig config("./config.json");qcloud_cos::CosAPI cos(config);std::string bucket_name = "examplebucket-1250000000"; // Change to the bucket namestd::string object_name = "exampleobject"; // Change to the object namestd::string local_file = "./test"; // Change to the local file nameqcloud_cos::MultiUploadObjectReq req(bucket_name, object_name, local_file); // CRC64 verification enabled by defaultreq.SetRecvTimeoutInms(1000 * 60);qcloud_cos::MultiUploadObjectResp resp;qcloud_cos::CosResult result = cos.MultiUploadObject(req, &resp); // Automatic verification of the CRC64 value// The call is successful. You can call the resp member functions to get the return content.if (result.IsSucc()) {// ...} else {// You can call the CosResult member functions to get the error information, such as requestID.}
Feedback