History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
GET /for-test.mp4?ci-process=filehash&type=md5 HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>
节点名称(关键字) | 描述 | 类型 | 是否必选 |
ci-process | 操作类型,哈希值计算固定为:filehash | String | 是 |
type | 支持的哈希算法类型,有效值:md5、sha1、sha256 | String | 是 |
addtoheader | 是否将计算得到的哈希值,自动添加至文件的自定义header,格式为:x-cos-meta-md5/sha1/sha256; 有效值: true、false,不填则默认为false。 | String | 否 |
<Response><FileHashCodeResult><MD5>0fe771ba515b0525552f59290a50c0ef</MD5><FileSize>1048576</FileSize></FileHashCodeResult><Input><Bucket>test-1234567890</Bucket><Object>wg.txt</Object><Region>ap-chongqing</Region></Input></Response>
节点名称(关键字) | 父节点 | 描述 | 类型 |
Response | 无 | 保存结果的容器 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
FileHashCodeResult | Response | 文件哈希值的结果。 | Container |
Input | Response | 输入文件的基本信息。 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
MD5 | Response.FileHashCodeResult | 请求时 type为 md5 时返回 | String |
SHA1 | Response.FileHashCodeResult | 请求时 type为 sha1 时返回 | String |
SHA256 | Response.FileHashCodeResult | 请求时 type为 sha256 时返回 | String |
FileSize | Response.FileHashCodeResult | 文件的大小。 | Int |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Region | Response.JobsDetail.Input | 存储桶所在地域。 | String |
Bucket | Response.JobsDetail.Input | 输入文件所在的存储桶。 | String |
Object | Response.JobsDetail.Input | 输入文件在存储桶中的名称。 | String |
GET /for-test.mp4?ci-process=filehash&type=md5 HTTP/1.1Host: test-1234567890.cos.ap-beijing.myqcloud.comAuthorization: q-sign-algorithm=sha1&q-ak=AKIDWtTCBYjM5OwLB9CAwA1Qb2ThTSUjfG****-sign-time=1484213027;32557109027&q-key-time=1484213027;32557109027&q-header-list=host&q-url-param-list=acl&q-signature=dcc1eb2022b79cb2a780bf062d3a40e120b4****Content-Length: 0
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 666Connection: keep-aliveDate: Mon, 28 Jun 2022 15:23:12 GMTServer: tencent-cosx-cos-request-id: NTg3NzRiMjVfYmRjMzVfMTViMl82ZGZmNw==<Response><FileHashCodeResult><MD5>0fe771ba515b0525552f59290a50c0ef</MD5><FileSize>1048576</FileSize><LastModified>2022-06-27T15:23:12+0800</LastModified><Etag>"ee8de918d05640145b18f70f4c3aa602"</Etag></FileHashCodeResult><Input><Bucket>test-1234567890</Bucket><Object>wg.txt</Object><Region>ap-chongqing</Region></Input></Response>
文档反馈