{"version": "2.0","statement": [{"action": ["name/cos:PostObject"],"effect": "allow","resource": ["qcs::cos:ap-beijing:uid/1250000000:examplebucket-1250000000/doc/*"]}]}
POST / HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: multipart/form-data; boundary=Multipart BoundaryContent-Length: Content Length[Multipart Form Data]
Name | Description | Type | Required |
key | For the object key, you can specify the ${filename} wildcard in it. The wildcard in the object key will then be replaced with the filename of the actually uploaded file. For a related example, see Case 7 in this document. | string | Yes |
Cache-Control | Cache directives defined in RFC 2616, to be saved as object metadata. | string | No |
Content-Disposition | File name defined in RFC 2616, to be saved as object metadata. | string | No |
Content-Encoding | Encoding format defined in RFC 2616, to be saved as object metadata. | string | No |
Content-Type | HTTP content type (MIME) defined in RFC 2616, to be saved as object metadata. Note: When a file is uploaded via a web form, the browser automatically includes the MIME type of the specified file in the request. However, COS does not use the MIME type provided by the browser. You must explicitly specify the Content-Type form field as the content type of the object. | string | No |
Expires | Cache expiration time defined in RFC 2616, to be saved as object metadata. | string | No |
success_action_redirect | The target URL address for redirection upon successful upload. If set, the system returns an HTTP status code 303 (Redirect) and a Location response header upon successful upload. The value of the Location response header is the URL address specified by this field, with the bucket, key, and etag parameters appended. For a related example, see Case 8 in this document. | string | No |
success_action_status | The HTTP status code returned upon successful upload can be 200, 201, or 204, with 204 as the default. If the success_action_redirect field is specified, this field is ignored. For a related example, see Case 9 in this document. | number | No |
x-cos-meta-[custom suffix] | User-defined metadata header. For example, x-cos-meta-test: test metadata.Note: The user-defined metadata header has a fixed format: x-cos-meta-[custom suffix]. The custom suffix supports hyphens (-), digits, and English letters (a to z). Uppercase English letters are converted to lowercase. Other characters, including underscores (_), are not supported.There is no limit on the number of user-defined metadata headers. The size of a single header is limited to 2 KB. The total size of all x-cos-meta-[custom suffix] headers must not exceed 4 KB. | string | No |
x-cos-storage-class | Object storage type. For the enumeration values, see the Storage Type document, for example: MAZ_STANDARD, MAZ_STANDARD_IA, INTELLIGENT_TIERING, MAZ_INTELLIGENT_TIERING, STANDARD_IA, ARCHIVE, DEEP_ARCHIVE. Default value: STANDARD for a single-AZ bucket; MAZ_STANDARD for a multi-AZ bucket. | enum | No |
x-cos-traffic-limit | Rate limit value for traffic control during this upload. Must be a numeric value, with the default unit being bit/s. The valid range for the rate limit is 819200 - 838860800, that is, 800 Kb/s - 800 Mb/s. A value outside this range will result in a 400 error. | integer | No |
x-cos-forbid-overwrite | For buckets with versioning disabled, specifies whether to forbid overwriting objects with the same name during upload operations. When the x-cos-forbid-overwrite header is not specified or is set to false, the Object with the same name is overwritten by default. When x-cos-forbid-overwrite is specified as true, it indicates that overwriting the Object with the same name is forbidden. Note: When versioning for a bucket is enabled, the x-cos-forbid-overwrite setting is ineffective, meaning overwriting objects with the same name is allowed. | string | No |
Content-MD5 | Base64-encoded MD5 hash of the file content, used for integrity checks to verify whether the file content has changed during transmission. | string | No |
file | File information and content. When file information and content are uploaded via a web form, the browser automatically sets the value of this field to the correct format. Note: The file field must be placed at the end of the entire form. | file | Yes |
Name | Description | Type | Required |
acl | Defines the Access Control List (ACL) property of an object. For the enumeration values, see the preset ACL section for objects in the ACL Overview document, such as default, private, public-read, and so on. The default value is default. Note: If you do not need to control object ACL, set it to default or leave it unset. In this case, bucket permissions are inherited by default. | Enum | No |
x-cos-grant-read | Grants the grantee the permission to read the object. The format is id="[OwnerUin]", for example, id="100000000001". Multiple grantees can be separated by commas (,), for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-read-acp | Grants the grantee the permission to read the Access Control List (ACL) of the object. The format is id="[OwnerUin]", for example, id="100000000001". Multiple grantees can be separated by commas (,), for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-write-acp | Grants the grantee the permission to write to the Access Control List (ACL) of the object. The format is id="[OwnerUin]", for example, id="100000000001". Multiple grantees can be separated by commas (,), for example, id="100000000001",id="100000000002". | string | No |
x-cos-grant-full-control | Grants the grantee full control permissions over the object. The format is id="[OwnerUin]", for example, id="100000000001". Multiple grantees can be separated by commas (,), for example, id="100000000001",id="100000000002". | string | No |
Name | Description | Type | Required |
x-cos-server-side-encryption | Server-side encryption algorithms, supporting AES256 and cos/kms. | string | This field is required when SSE-COS or SSE-KMS is used. |
x-cos-server-side-encryption-customer-algorithm | Server-side encryption algorithms, supporting AES256. | string | This field is required when SSE-C is used. |
x-cos-server-side-encryption-cos-kms-key-id | When the value of x-cos-server-side-encryption is cos/kms, use this field to specify the kms customer master key (CMK). If not specified, the CMK created by COS by default is used. For more details, see SSE-kms Encryption. | string | No |
x-cos-server-side-encryption-context | Specifies the encryption context when the value of x-cos-server-side-encryption is cos/kms. The value is the Base64 encoding of a JSON-formatted key-value pair for the encryption context. For example, eyJhIjoiYXNkZmEiLCJiIjoiMTIzMzIxIn0=. | string | No |
x-cos-server-side-encryption-customer-key | Base64 encoding of the server-side encryption key For example, MDEyMzQ1Njc4OUFCQ0RFRjAxMjM0NTY3ODlBQkNERUY=. | string | This field is required when SSE-C is used. |
x-cos-server-side-encryption-customer-key-MD5 | MD5 hash value of the server-side encryption key, encoded in Base64 For example, U5L61r7jcwdNvT7frmUG8g==. | string | Required when SSE-C is used. |
StartTimestamp;EndTimestamp, which is the KeyTime.{"expiration": "2019-08-30T09:38:12.414Z","conditions": [{ "acl": "default" },{ "bucket": "examplebucket-1250000000" },[ "starts-with", "$key", "folder/subfolder/" ],[ "starts-with", "$Content-Type", "image/" ],[ "starts-with", "$success_action_redirect", "https://my.website/" ],[ "eq", "$x-cos-server-side-encryption", "AES256" ],{ "q-sign-algorithm": "sha1" },{ "q-ak": "************************************" },{ "q-sign-time": "1567150692;1567157892" }]}
Type | Description |
Exact match | Use the { "key": "value" } or [ "eq", "$key", "value" ] format, where key is the restricted form field and value is the restricted value. |
Prefix matching | Use the [ "starts-with", "$key", "value" ] format, where key is the restricted form field and value is the restricted prefix, which can be empty. |
Range match | Applies only to [ "content-length-range", minNum, maxNum ], used to restrict the file length to be within the range of minNum and maxNum. |
Field Name | Description | Matching Method | Required |
acl | Access Control List (ACL) property of an object | Exact match or prefix match | No |
bucket | Bucket for uploads | Exact match | No |
key | Object key. If the object key uses the ${filename} wildcard during upload, the object key will be processed into the final object key before the policy is validated. In this case, prefix matching should be used in the policy, and the ${filename} wildcard should not appear. | Exact match or prefix match | No |
content-length-range | File length range | Scope | No |
Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires | Headers defined in RFC 2616, returned as response headers when an object is downloaded. | Exact match or prefix match | No |
success_action_redirect | Target URL address for redirection upon successful upload | Exact match or prefix match | No |
success_action_status | HTTP status code returned upon successful upload | Exact match | No |
x-cos-meta-[custom suffix] | User-defined metadata header. For example, x-cos-meta-test: test metadata.Note: The user-defined metadata header has a fixed format: x-cos-meta-[custom suffix]. The custom suffix supports hyphens (-), digits, and English letters (a to z). Uppercase English letters are converted to lowercase. Other characters, including underscores (_), are not supported.There is no limit on the number of user-defined metadata headers. The size of a single header is limited to 2 KB. The total size of all x-cos-meta-[custom suffix] headers must not exceed 4 KB. | Exact match or prefix match | No |
x-cos-* | Other COS-related form fields mentioned in this document, such as ACL and SSE related fields. | Exact match | No |
q-sign-algorithm | Signature hash algorithm, fixed as sha1 | Exact match | Yes |
q-ak | SecretId mentioned above | Exact match | Yes |
q-sign-time | KeyTime generated above | Exact match | Yes |
{ "acl": "default" } is specified, then the field `acl` with the value `default` must appear in the form.39acc8c9f34ba5b19bce4e965b370cd3f62d2fba.d5d903b8360468bc81c1311f134989bc8c8b5b89.7758dc9a832e9d301dca704cacbf9d9f8172****.Name | Description | Type | Required |
x-cos-security-token | The security token field that must be passed when temporary security credentials are used. For details, see the Temporary Security Credentials related documentation. | string | No, when using temporary Required when temporary keys are used. |
policy | Base64-encoded "Policy" content | string | Yes |
q-sign-algorithm | Signature hash algorithm, fixed as sha1. | string | Yes |
q-ak | SecretId mentioned above | string | Yes |
q-key-time | KeyTime generated above | string | Yes |
q-signature | Signature generated above | string | Yes |
APPID | SecretId | SecretKey |
1250000000 | ************************************ | BQYIM75p8x0iWVFSIgqEKwFprpRS**** |
{"expiration": "2019-08-30T09:38:12.414Z","conditions": [{ "acl": "default" },{ "bucket": "examplebucket-1250000000" },[ "starts-with", "$key", "folder/subfolder/" ],[ "starts-with", "$Content-Type", "image/" ],[ "starts-with", "$success_action_redirect", "https://my.website/" ],[ "eq", "$x-cos-server-side-encryption", "AES256" ],{ "q-sign-algorithm": "sha1" },{ "q-ak": "************************************" },{ "q-sign-time": "1567150692;1567157892" }]}
1567150692;156715789239acc8c9f34ba5b19bce4e965b370cd3f62d2fbad5d903b8360468bc81c1311f134989bc8c8b5b897758dc9a832e9d301dca704cacbf9d9f8172****ewogICAgImV4cGlyYXRpb24iOiAiMjAxOS0wOC0zMFQwOTozODoxMi40MTRaIiwKICAgICJjb25kaXRpb25zIjogWwogICAgICAgIHsgImFjbCI6ICJkZWZhdWx0IiB9LAogICAgICAgIHsgImJ1Y2tldCI6ICJleGFtcGxlYnVja2V0LTEyNTAwMDAwMDAiIH0sCiAgICAgICAgWyAic3RhcnRzLXdpdGgiLCAiJGtleSIsICJmb2xkZXIvc3ViZm9sZGVyLyIgXSwKICAgICAgICBbICJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgImltYWdlLyIgXSwKICAgICAgICBbICJzdGFydHMtd2l0aCIsICIkc3VjY2Vzc19hY3Rpb25fcmVkaXJlY3QiLCAiaHR0cHM6Ly9teS53ZWJzaXRlLyIgXSwKICAgICAgICBbICJlcSIsICIkeC1jb3Mtc2VydmVyLXNpZGUtZW5jcnlwdGlvbiIsICJBRVMyNTYiIF0sCiAgICAgICAgeyAicS1zaWduLWFsZ29yaXRobSI6ICJzaGExIiB9LAogICAgICAgIHsgInEtYWsiOiAiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIiB9LAogICAgICAgIHsgInEtc2lnbi10aW1lIjogIjE1NjcxNTA2OTI7MTU2NzE1Nzg5MiIgfQogICAgXQp9sha1************************************1567150692;1567157892****************************************Name | Description | Type |
Location | When the success_action_redirect form field is used, the value of this response header is set to the URL specified by success_action_redirect, with the bucket, key, and etag parameters appended. For a related example, see Case 8 in this document. When the success_action_redirect form field is not used, the value of this response header is set to the complete object access URL. For a related example, see Case 1 in this document. | string |
Name | Description | Type |
x-cos-version-id | Version ID of an object. | string |
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:39:34 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Length: 1119Connection: close------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0Mzc0OzE1NjcwNzE1NzQifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjM5OjM0LjQ3MVoifQ==------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-key-time"1567064374;1567071574------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-signature"74ba120129a13d8f0e19479fbdc01bca3bca****------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryZBPbaoYE2gqeB21N--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:39:34 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxMzZfMmViMDJhMDlfY2NjOF84NGQz****
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:39:34 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundary9JtEhEGHSdx8PatgContent-Length: 2146Connection: close------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="acl"public-read------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="Cache-Control"max-age=86400------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="Content-Disposition"attachment; filename=example.jpg------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="Content-Type"image/jpeg------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="x-cos-meta-example-field"example-value------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="Content-MD5"7o3pGNBWQBRbGPcPTDqmAg==------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJhY2wiOiJwdWJsaWMtcmVhZCJ9LHsiYnVja2V0IjoiZXhhbXBsZWJ1Y2tldC0xMjUyMjQ2NTU1In0seyJrZXkiOiJleGFtcGxlb2JqZWN0In0sWyJlcSIsIiRDb250ZW50LURpc3Bvc2l0aW9uIiwiYXR0YWNobWVudDsgZmlsZW5hbWU9ZXhhbXBsZS5qcGciXSxbInN0YXJ0cy13aXRoIiwiJENvbnRlbnQtVHlwZSIsImltYWdlLyJdLFsiZXEiLCIkeC1jb3MtbWV0YS1leGFtcGxlLWZpZWxkIiwiZXhhbXBsZS12YWx1ZSJdLHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioifSx7InEtc2lnbi10aW1lIjoiMTU2NzA2NDM3NDsxNTY3MDcxNTc0In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQwOTozOTozNC45MzdaIn0=------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-key-time"1567064374;1567071574------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-signature"228a89b5f7b8fce7fdfa4a3b36cfb5a5eafb****------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundary9JtEhEGHSdx8Patg--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:39:35 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxMzdfM2NhZjJhMDlfMTQzYV84Nzhh****
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:39:35 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Length: 1296Connection: close------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="x-cos-server-side-encryption"AES256------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJ4LWNvcy1zZXJ2ZXItc2lkZS1lbmNyeXB0aW9uIjoiQUVTMjU2In0seyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0Mzc1OzE1NjcwNzE1NzUifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjM5OjM1LjUyN1oifQ==------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-key-time"1567064375;1567071575------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-signature"65f3f8864bb1b271e1235d1ec7d1cb508ffa****------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryBVaHvBJQJnQrAxKY--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:39:35 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxMzdfMTljMDJhMDlfNTg4ZF84Njgx****x-cos-server-side-encryption: AES256
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:39:36 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Length: 1667Connection: close------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="x-cos-server-side-encryption-customer-algorithm"AES256------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="x-cos-server-side-encryption-customer-key"MDEyMzQ1Njc4OUFCQ0RFRjAxMjM0NTY3ODlBQkNERUY=------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="x-cos-server-side-encryption-customer-key-MD5"U5L61r7jcwdNvT7frmUG8g==------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJ4LWNvcy1zZXJ2ZXItc2lkZS1lbmNyeXB0aW9uLWN1c3RvbWVyLWFsZ29yaXRobSI6IkFFUzI1NiJ9LHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioifSx7InEtc2lnbi10aW1lIjoiMTU2NzA2NDM3NjsxNTY3MDcxNTc2In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQwOTozOTozNi4wODdaIn0=------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-key-time"1567064376;1567071576------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-signature"0273a4b4ede39d0e5162758e145ea0c3e9ef****------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryYa6H7Gd4xuhlyfJb--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:39:36 GMTETag: "582d9105f71525f3c161984bc005efb5"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxMzhfMzdiMDJhMDlfNDA4YV84MzQx****x-cos-server-side-encryption-customer-algorithm: AES256x-cos-server-side-encryption-customer-key-MD5: U5L61r7jcwdNvT7frmUG8g==
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:40:07 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryJspR3QIUhGJLALwfContent-Length: 1119Connection: close------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0NDA3OzE1NjcwNzE2MDcifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjQwOjA3LjQ4OFoifQ==------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-key-time"1567064407;1567071607------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-signature"699ad0ce7780eb559b75e88f77e95743d829****------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryJspR3QIUhGJLALwf--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:40:07 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxNTdfNzFiNDBiMDlfMmE3ZmJfODQ1****x-cos-version-id: MTg0NDUxNzcwMDkzMDE3NDQ0MDU
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 07:40:38 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Length: 1119Connection: close------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0NDM4OzE1NjcwNzE2MzgifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjQwOjM4LjA5MloifQ==------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-key-time"1567064438;1567071638------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-signature"bb04222322bfb17f4d1f43833bbbac0a03aa****------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryX8hd2lxTMzIBk5Li--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 07:40:38 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2NzgxNzZfMjFjOTBiMDlfMWY3YTFfNjY2****
${filename} Wildcard for Object Keys (Form Field key)POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 12:35:07 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Length: 1188Connection: close------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="key"folder/subfolder/${filename}------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJmb2xkZXIvc3ViZm9sZGVyLyJdLHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiIqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioifSx7InEtc2lnbi10aW1lIjoiMTU2NzA4MjEwNzsxNTY3MDg5MzA3In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQxNDozNTowNy44OTlaIn0=------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-key-time"1567082107;1567089307------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-signature"3cc37f8c81e36f57506efa02d0a3b6c9d551****------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="file"; filename="photo.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryHrAMWZO4BNyT0rca--
HTTP/1.1 204 No ContentContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 12:35:08 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/folder/subfolder/photo.jpgServer: tencent-cosx-cos-request-id: NWQ2N2M2N2NfNWZhZjJhMDlfNmUzMV84OTg4****
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 08:02:29 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Length: 1351Connection: close------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="success_action_redirect"https://my.website/upload_success.html------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRzdWNjZXNzX2FjdGlvbl9yZWRpcmVjdCIsImh0dHBzOi8vbXkud2Vic2l0ZS8iXSx7InEtc2lnbi1hbGdvcml0aG0iOiJzaGExIn0seyJxLWFrIjoiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIn0seyJxLXNpZ24tdGltZSI6IjE1NjcwNjU3NDk7MTU2NzA3Mjk0OSJ9XSwiZXhwaXJhdGlvbiI6IjIwMTktMDgtMjlUMTA6MDI6MjkuMjcyWiJ9------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-key-time"1567065749;1567072949------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-signature"c4a8ae7411687bc3d6ed2ac9b249e87a50b5****------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryJ0bRH1MwgMq5eu6H--
HTTP/1.1 303 RedirectContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 08:02:29 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: https://my.website/upload_success.html?bucket=examplebucket-1250000000&key=exampleobject&etag=%22ee8de918d05640145b18f70f4c3aa602%22Server: tencent-cosx-cos-request-id: NWQ2Nzg2OTVfMTRiYjI0MDlfZGFkOV85MDA4****
POST / HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Thu, 29 Aug 2019 08:04:29 GMTContent-Type: multipart/form-data; boundary=----WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Length: 1270Connection: close------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="key"exampleobject------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="success_action_status"200------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="policy"eyJjb25kaXRpb25zIjpbeyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDAifSx7InEtc2lnbi1hbGdvcml0aG0iOiJzaGExIn0seyJxLWFrIjoiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIn0seyJxLXNpZ24tdGltZSI6IjE1NjcwNjU4Njk7MTU2NzA3MzA2OSJ9XSwiZXhwaXJhdGlvbiI6IjIwMTktMDgtMjlUMTA6MDQ6MjkuMzI3WiJ9------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-ak"************************************------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-key-time"1567065869;1567073069------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-signature"e46285af04d4fb68e0624fdd0a525b6a07ab****------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="file"; filename="example.jpg"Content-Type: image/jpeg[Object Content]------WebKitFormBoundaryST9Mz8AGzCDphgJF--
HTTP/1.1 200 OKContent-Length: 0Connection: closeDate: Thu, 29 Aug 2019 08:04:29 GMTETag: "ee8de918d05640145b18f70f4c3aa602"Location: http://examplebucket-1250000000.cos.ap-beijing.myqcloud.com/exampleobjectServer: tencent-cosx-cos-request-id: NWQ2Nzg3MGRfZjhjODBiMDlfOGM3N184Nzdl****
SDK | Documentation Link |
.NET(C#) SDK | |
JavaScript SDK | |
Node.js SDK | |
Mini Program SDK |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários