PUT /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: Content TypeContent-Length: Content LengthContent-MD5: MD5Authorization: Auth String[Object Content]
Name | Description | Type | Mandatory |
Cache-Control | Cache directive defined in RFC 2616, which will be preserved as object metadata. | string | No |
Content-Disposition | File name defined in RFC 2616, which will be preserved as object metadata. | string | No |
Content-Encoding | Encoding format defined in RFC 2616, which will be preserved as object metadata. | string | No |
Content-Type | HTTP request content type (MIME) defined in RFC 2616. This header is used to describe the content type of the object to be uploaded, which will be preserved as object metadata. For instance, text/html or image/jpeg . | string | Yes |
Expires | Cache expiration time defined in RFC 2616, which will be preserved as object metadata. | string | No |
Transfer-Encoding | If you want to employ chunked transfer encoding during the upload process, specify the Transfer-Encoding: chunked request header. In this instance, the request body adheres to the transmission encoding format defined in RFC 2616, and the Content-Length request header cannot be specified. | string | No |
x-cos-meta-* | User-defined metadata header suffixes and user-defined metadata information are stored as object metadata, with a size limit of 2 KB. Note: User-defined metadata information supports underscores (_). However, user-defined metadata header suffixes do not support underscores (_) and only support hyphens (-). | string | No |
x-cos-storage-class | COS type. For details about the enumerated values, see Storage Class Overview, such as MAZ_STANDARD, MAZ_STANDARD_IA, INTELLIGENT_TIERING, MAZ_INTELLIGENT_TIERING, STANDARD_IA, ARCHIVE, and DEEP_ARCHIVE. Default value: STANDARD. | enum | No |
x-cos-traffic-limit | Traffic control limit for this upload. The value must be a digit and the default unit is bit/s. The range is 819200-838860800, equating to 800 Kb/s - 800 Mb/s. Any value outside this range will result in a 400 error. | integer | No |
x-cos-tagging | Collection of object tags. A maximum of 10 tags can be set (for instance, Key1=Value1&Key2=Value2). Both Key and Value in the tag collection must be URL encoded in advance. | string | No |
x-cos-forbid-overwrite | For a bucket which has never enabled versioning, you may use it to specify whether to prohibit overwriting the object with the same name when uploading the object: When the x-cos-forbid-overwrite header is not specified or specified as false, the object with the same name will be overwritten by default; When the x-cos-forbid-overwrite is specified as true, overwriting the object with the same name will be prohibited. Note: For a bucket which has enabled versioning or suspended versioning, the x-cos-forbid-overwrite request header is invalid, which means overwriting objects with the same name is allowed whether the x-cos-forbid-overwrite request header is specified as true or false. | string | Not required |
Name | Description | Type | Mandatory |
x-cos-acl | Defines the access control list (ACL) attributes of the object. For enumerated values, refer to the preset ACL section in ACL, such as default, private, public-read. The default value is default. Note: If you do not require object ACL control, set this parameter to default or leave this parameter unset, which means that by default the permissions of the bucket will be inherited. | enum | No |
x-cos-grant-read | Grants the authorized party the permission to read the object. The format is id="[OwnerUin]", for instance, id="100000000001". Multiple authorized parties can be separated by commas (,), for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-read-acp | Grants the authorized party the permission to read the ACL of the object. The format is id="[OwnerUin]", for instance, id="100000000001". Multiple authorized parties can be separated by commas (,), such as id="100000000001",id="100000000002" . | string | No |
x-cos-grant-write-acp | Grants the authorized party the permission to write data into the ACL of the object. The format is id="[OwnerUin]", for instance, id="100000000001". Multiple authorized parties can be separated by commas (,), such as id="100000000001",id="100000000002" . | string | No |
x-cos-grant-full-control | Grants all permissions on the object to the authorized party. The format is id="[OwnerUin]", for instance, id="100000000001". Multiple authorized parties can be separated by commas (,), such as id="100000000001";id="100000000002" . | string | No |
Name | Description | Type |
x-cos-version-id | Object's version ID. | string |
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:35:05 GMTContent-Type: image/jpegContent-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511305;1586518505&q-key-time=1586511305;1586518505&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=&q-signature=c4147d4d457869a49b13e8e936c06a12c809****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:35:05 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNkYzlfNjRiODJhMDlfMzFmYzhfMTFm****
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:35:28 GMTContent-Type: image/jpegCache-Control: max-age=86400Content-Disposition: attachment; filename=example.jpgx-cos-meta-example-field: example-valuex-cos-acl: public-readContent-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511328;1586518528&q-key-time=1586511328;1586518528&q-header-list=cache-control;content-disposition;content-length;content-md5;content-type;date;host;x-cos-acl;x-cos-meta-example-field&q-url-param-list=&q-signature=20d0cd79060cec8c560ebd239738626726f4****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:35:28 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNkZTBfZjhjMDBiMDlfNzdmN18xMGFi****
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:35:49 GMTContent-Type: image/jpegx-cos-server-side-encryption: AES256Content-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511349;1586518549&q-key-time=1586511349;1586518549&q-header-list=content-length;content-md5;content-type;date;host;x-cos-server-side-encryption&q-url-param-list=&q-signature=35145bc61ae490c4959b58bc6d27b3258bf7****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:35:49 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNkZjVfYzVjNzJhMDlfMjVhNzNfMWMy****x-cos-server-side-encryption: AES256
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:00 GMTContent-Type: image/jpegx-cos-server-side-encryption: cos/kmsx-cos-server-side-encryption-cos-kms-key-id: 48ba38aa-26c5-11ea-855c-52540085****x-cos-server-side-encryption-context: eyJhdXRob3IiOiJmeXNudGlhbiIsImNvbXBhbnkiOiJUZW5jZW50In0=Content-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511360;1586518560&q-key-time=1586511360;1586518560&q-header-list=content-length;content-md5;content-type;date;host;x-cos-server-side-encryption;x-cos-server-side-encryption-context;x-cos-server-side-encryption-cos-kms-key-id&q-url-param-list=&q-signature=6cb5d6f0137bb1d87f5afe98c5289b0de375****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:36:01 GMTETag: "840af7c921f4b3230049af8663145bd0"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMDFfOThjMjJhMDlfMjhhMl8xNTlm****x-cos-server-side-encryption: cos/kmsx-cos-server-side-encryption-cos-kms-key-id: 48ba38aa-26c5-11ea-855c-52540085****
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:12 GMTContent-Type: image/jpegx-cos-server-side-encryption-customer-algorithm: AES256x-cos-server-side-encryption-customer-key: MDEyMzQ1Njc4OUFCQ0RFRjAxMjM0NTY3ODlBQkNERUY=x-cos-server-side-encryption-customer-key-MD5: U5L61r7jcwdNvT7frmUG8g==Content-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511372;1586518572&q-key-time=1586511372;1586518572&q-header-list=content-length;content-md5;content-type;date;host;x-cos-server-side-encryption-customer-algorithm;x-cos-server-side-encryption-customer-key;x-cos-server-side-encryption-customer-key-md5&q-url-param-list=&q-signature=4f6f9f0a6700930f70bff31e3a2b2e622711****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:36:13 GMTETag: "582d9105f71525f3c161984bc005efb5"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMGNfZTFjODJhMDlfMzVlMDFfZTk1****x-cos-server-side-encryption-customer-algorithm: AES256x-cos-server-side-encryption-customer-key-MD5: U5L61r7jcwdNvT7frmUG8g==
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:36:34 GMTContent-Type: image/jpegContent-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511394;1586518594&q-key-time=1586511394;1586518594&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=&q-signature=371f555ec81751e1dbf38927e568af4cc67a****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:36:35 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlMjNfMThiODJhMDlfNGQ1OF8xMWY4****x-cos-version-id: MTg0NDUxNTc1NjIzMTQ1MDAwODg
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Apr 2020 09:37:07 GMTContent-Type: image/jpegContent-Length: 16Content-MD5: 7o3pGNBWQBRbGPcPTDqmAg==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1586511427;1586518627&q-key-time=1586511427;1586518627&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=&q-signature=0747f6508fca37dfb5c91bbe3fa01f91b326****Connection: close[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:37:07 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Server: tencent-cosx-cos-hash-crc64ecma: 16749565679157681890x-cos-request-id: NWU5MDNlNDNfZTZjNzJhMDlfMmYwMDlfMTVi****
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 08 Aug 2019 09:15:29 GMTContent-Type: text/plainTransfer-Encoding: chunkedAuthorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1565255729;1565262929&q-key-time=1565255729;1565262929&q-header-list=content-type;date;host;transfer-encoding&q-url-param-list=&q-signature=0b05b6bda75afbc159caa0da4e4051ec6939****Connection: close11[Chunked Content]b[2nd chunk]b[3rd chunk]b[4th chunk]0
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Thu, 08 Aug 2019 09:15:29 GMTETag: "aa488bb80185a6be87f4a7b936a80752"Server: tencent-cosx-cos-hash-crc64ecma: 7188322482464764960x-cos-request-id: NWQ0YmU4MzFfNzFiNDBiMDlfMWJhYTlfMTY2Njll****
PUT /exampleobject HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comx-cos-object-lock-retain-until-date: 2022-12-30T10:30:09.000Zx-cos-object-lock-mode: COMPLIANCE[Object Content]
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Fri, 10 Apr 2020 09:35:05 GMTETag: "ee8de918d05640145b18*****"Server: tencent-cosx-cos-hash-crc64ecma: 167495656791****x-cos-request-id: NWU5MDNkYzlfNjRiODJhMDlfMzFmYz********
Apakah halaman ini membantu?