x-cos-version-id
response header.null
as the version ID of the object and will not return the x-cos-version-id
response header.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]
APPID
, such as examplebucket-1250000000
(see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).enctype
attribute to multipart/form-data
. After this, use HTML elements (such as <input> and <select>) to add form fields as needed.Field | Description | Type | Required |
key | Object key. If you use the ${filename} wildcard in the object key, the wildcard will be replaced with the name of the object uploaded (see Example 7). | string | Yes |
Cache-Control | Cache directives defined in RFC 2616. It will be stored as object metadata. | string | No |
Content-Disposition | Filename defined in RFC 2616. It will be stored as object metadata. | string | No |
Content-Encoding | Encoding format defined in RFC 2616. It will be stored as object metadata. | string | No |
Content-Type | HTTP content type (MIME) defined in RFC 2616. It will be stored as object metadata Note: If a file is uploaded via an HTML form, the browser will automatically carry the file's MIME type in the request. However, COS will not use this MIME type carried. Therefore, you need to use the Content-Type field to specify the content type of the object. | string | No |
Expires | Cache expiration time defined in RFC 2616. It will be stored as object metadata. | string | No |
success_action_redirect | Redirection target URL if the upload succeeds. If this field is set, HTTP status code "303 (Redirect)" and the Location response header will be returned. Location will include the URL specified in this field as well as the bucket, key, and ETag parameters (see Example 8). | string | No |
success_action_status | HTTP status code to return for a successful upload. Valid values: 200 , 201 , 204 (default). If success_action_redirect is specified, this field will be ignored (see Example 9). | number | No |
x-cos-meta-* | User-defined metadata and header suffixes. It will be stored as object metadata. Maximum size: 2 KB. Note: User-defined metadata can contain underscores (_), but header suffixes can contain minus signs (−) but not underscores. | string | No |
x-cos-storage-class | Object storage class. For the enumerated values, such as STANDARD (default), INTELLIGENT_TIERING , STANDARD_IA , ARCHIVE , and DEEP_ARCHIVE , see Storage Class Overview. | Enum | No |
x-cos-traffic-limit | Limits the speed (in bit/s) for the current upload for traffic control. Valid range: 819200−838860800 (i.e., 100 KB/s−100 MB/s). If the speed exceeds the limit, a 400 error will be returned. | integer | No |
Content-MD5 | MD5 checksum of the Base64-encoded file content. It is used for integrity check, i.e., whether the file content has changed during the upload. | string | No |
file | File information and content. When the file is uploaded via an HTML form, the browser automatically sets the value of this parameter to the correct format. Note: This field must be placed at the end of the form. | file | Yes |
Field | Description | Type | Required |
acl | Defines the ACL attribute of the object. For the enumerated values, such as default (default), private , and public-read , see the Preset ACL section in ACL Overview. Note: If you do not need to set an ACL for the object, set this parameter to default or leave it empty. In this way, the object will inherit the permissions of the bucket it is stored in. | Enum | No |
x-cos-grant-read | Grants a user permission to read the object in the format: id="[OwnerUin]" (e.g., id="100000000001" ). You can use comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-read-acp | Grants a user permission to read the ACL of an object in the format: id="[OwnerUin]" (e.g., id="100000000001" ). You can use comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-write-acp | Grants a user permission to write to the ACL of an object in the format: id="[OwnerUin]" (e.g., id="100000000001" ). You can use comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
x-cos-grant-full-control | Grants a user full permission to operate on an object in the format: id="[OwnerUin]" (e.g., id="100000000001" ). You can use comma (,) to separate multiple users, for example, id="100000000001",id="100000000002" . | string | No |
Field | Description | Type | Required |
x-cos-server-side-encryption | Server-side encryption algorithm. AES256 and cos/kms are supported. | string | Required if SSE-COS or SSE-KMS is used |
x-cos-server-side-encryption-customer-algorithm | Server-side encryption algorithm. AES256 is supported. | string | Required if SSE-C is used |
x-cos-server-side-encryption-cos-kms-key-id | Customer master key (CMK) of KMS if x-cos-server-side-encryption is set to cos/kms . If this field is not specified, the default CMK created by COS will be used. For more information, see SSE-KMS Encryption. | string | No |
x-cos-server-side-encryption-context | Base64-encoded encryption context (key-value pairs in JSON format) if x-cos-server-side-encryption is set to cos/kms . Example: eyJhIjoiYXNkZmEiLCJiIjoiMTIzMzIxIn0= | string | No |
x-cos-server-side-encryption-customer-key | Base64-encoded server-side encryption key Example: MDEyMzQ1Njc4OUFCQ0RFRjAxMjM0NTY3ODlBQkNERUY= | string | Required if SSE-C is used |
x-cos-server-side-encryption-customer-key-MD5 | Base64-encoded MD5 checksum of the server-side encryption key Example: U5L61r7jcwdNvT7frmUG8g== | string | Required if SSE-C is used |
StartTimestamp
of the current time. It is the total number of seconds elapsed from January 1, 1970, 00:00:00 UTC till the current time.
b. Calculate the Unix EndTimestamp
for the signature to expire according to StartTimestamp
and the expected validity period of the signature.
c. Generate KeyTime
by splicing the two timestamps above in StartTimestamp;EndTimestamp
format.{"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": "AKIDQjz3ltompVjBni5LitkWHFlFpwkn9U5q" },{ "q-sign-time": "1567150692;1567157892" }]}
expiration
: The policy's expiration time, which is a string in ISO 8601 format.conditions
: An array of conditions for the policy. The conditions are described below.Type | Description |
Exact Match | Uses {" key ":" value "} or [" eq "," $ key "," value "] , where key is a limited form field and value is a limited value. |
Prefix Match | Uses [ "starts-with", "$key", "value" ] , where key is a limited form field and value is a limited prefix that can be empty. |
Range Match | Uses [ "content-length-range", minNum, maxNum ] to limit the file size to be within minNum and maxNum . |
Field | Description | Match Type | Required |
acl | ACL attribute of the object | Exact/Prefix | No |
bucket | Bucket for upload | Exact | No |
key | Object key. If you use the ${filename} wildcard in the object key during upload, the object key will be processed to the final object key before the policy is verified. Therefore, you should use prefix match in the policy and ${filename} should not appear. | Exact/Prefix | No |
content-length-range | Range of the file length | Range | No |
Cache-Control, Content-Type, Content-Disposition, Content-Encoding, Expires | Headers defined in RFC 2616, which will be returned as response headers when the object is downloaded. | Exact/Prefix | No |
success_action_redirect | Redirection target URL when the upload succeeds | Exact/Prefix | No |
success_action_status | HTTP status code returned when the upload succeeds | Exact | No |
x-cos-meta-* | User-defined metadata headers | Exact/Prefix | No |
x-cos-* | Other COS-related form fields described in this document, such as ACL- or SSE-related fields | Exact | No |
q-sign-algorithm | Signature hash algorithm. Fixed at sha1 | Exact | Yes |
q-ak | SecretId mentioned above | Exact | Yes |
q-sign-time | KeyTime generated above | Exact | Yes |
bucket
, fields that are used for limitation in the policy must be used in the form fields. For example, if { "acl": "default" }
is used, acl
must be used and set to default
in the form.SecretKey
as the key and KeyTime
as the message to calculate the message digest (hash value, lowercase hexadecimal), that is, the SignKey
(e.g., 39acc8c9f34ba5b19bce4e965b370cd3f62d2fba
).StringToSign
(e.g., d5d903b8360468bc81c1311f134989bc8c8b5b89
).SignKey
(string, not binary) as the key and StringToSign
(string, not binary) as the message to calculate the message digest (hash value, lowercase hexadecimal), that is, the Signature
(e.g., 7758dc9a832e9d301dca704cacbf9d9f8172fdef
).Parameter | Description | Type | Required |
x-cos-security-token | Security token when a temporary security token is used. For more information, see Temporary security credentials. | string | No (Required when a temp key is used) |
policy | Base64-encoded policy | string | Yes |
q-sign-algorithm | Signature hash algorithm. Fixed at 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 |
file
form field.APPID
, SecretId
, and SecretKey
. Below is an example:APPID | SecretId | SecretKey |
1250000000 | AKIDQjz3ltompVjBni5LitkWHFlFpwkn9U5q | BQYIM75p8x0iWVFSIgqEKwFprpRSVHlz |
{"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": "AKIDQjz3ltompVjBni5LitkWHFlFpwkn9U5q" },{ "q-sign-time": "1567150692;1567157892" }]}
1567150692;1567157892
39acc8c9f34ba5b19bce4e965b370cd3f62d2fba
d5d903b8360468bc81c1311f134989bc8c8b5b89
7758dc9a832e9d301dca704cacbf9d9f8172fdef
ewogICAgImV4cGlyYXRpb24iOiAiMjAxOS0wOC0zMFQwOTozODoxMi40MTRaIiwKICAgICJjb25kaXRpb25zIjogWwogICAgICAgIHsgImFjbCI6ICJkZWZhdWx0IiB9LAogICAgICAgIHsgImJ1Y2tldCI6ICJleGFtcGxlYnVja2V0LTEyNTAwMDAwMDAiIH0sCiAgICAgICAgWyAic3RhcnRzLXdpdGgiLCAiJGtleSIsICJmb2xkZXIvc3ViZm9sZGVyLyIgXSwKICAgICAgICBbICJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgImltYWdlLyIgXSwKICAgICAgICBbICJzdGFydHMtd2l0aCIsICIkc3VjY2Vzc19hY3Rpb25fcmVkaXJlY3QiLCAiaHR0cHM6Ly9teS53ZWJzaXRlLyIgXSwKICAgICAgICBbICJlcSIsICIkeC1jb3Mtc2VydmVyLXNpZGUtZW5jcnlwdGlvbiIsICJBRVMyNTYiIF0sCiAgICAgICAgeyAicS1zaWduLWFsZ29yaXRobSI6ICJzaGExIiB9LAogICAgICAgIHsgInEtYWsiOiAiQUtJRFFqejNsdG9tcFZqQm5pNUxpdGtXSEZsRnB3a245VTVxIiB9LAogICAgICAgIHsgInEtc2lnbi10aW1lIjogIjE1NjcxNTA2OTI7MTU2NzE1Nzg5MiIgfQogICAgXQp9
sha1
AKIDQjz3ltompVjBni5LitkWHFlFpwkn9U5q
1567150692;1567157892
7758dc9a832e9d301dca704cacbf9d9f8172fdef
Header | Description | Type |
x-cos-version-id | Version ID of the 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"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IkFLSUQ4QTBmQlZ0WUZyTm0wMm9ZMWcxSlFRRjBjM0pPNk5FdSJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0Mzc0OzE1NjcwNzE1NzQifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjM5OjM0LjQ3MVoifQ==------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryZBPbaoYE2gqeB21NContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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"eyJjb25kaXRpb25zIjpbeyJhY2wiOiJwdWJsaWMtcmVhZCJ9LHsiYnVja2V0IjoiZXhhbXBsZWJ1Y2tldC0xMjUyMjQ2NTU1In0seyJrZXkiOiJleGFtcGxlb2JqZWN0In0sWyJlcSIsIiRDb250ZW50LURpc3Bvc2l0aW9uIiwiYXR0YWNobWVudDsgZmlsZW5hbWU9ZXhhbXBsZS5qcGciXSxbInN0YXJ0cy13aXRoIiwiJENvbnRlbnQtVHlwZSIsImltYWdlLyJdLFsiZXEiLCIkeC1jb3MtbWV0YS1leGFtcGxlLWZpZWxkIiwiZXhhbXBsZS12YWx1ZSJdLHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiJBS0lEOEEwZkJWdFlGck5tMDJvWTFnMUpRUUYwYzNKTzZORXUifSx7InEtc2lnbi10aW1lIjoiMTU2NzA2NDM3NDsxNTY3MDcxNTc0In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQwOTozOTozNC45MzdaIn0=------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundary9JtEhEGHSdx8PatgContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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"eyJjb25kaXRpb25zIjpbeyJ4LWNvcy1zZXJ2ZXItc2lkZS1lbmNyeXB0aW9uIjoiQUVTMjU2In0seyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IkFLSUQ4QTBmQlZ0WUZyTm0wMm9ZMWcxSlFRRjBjM0pPNk5FdSJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0Mzc1OzE1NjcwNzE1NzUifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjM5OjM1LjUyN1oifQ==------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryBVaHvBJQJnQrAxKYContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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"eyJjb25kaXRpb25zIjpbeyJ4LWNvcy1zZXJ2ZXItc2lkZS1lbmNyeXB0aW9uLWN1c3RvbWVyLWFsZ29yaXRobSI6IkFFUzI1NiJ9LHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiJBS0lEOEEwZkJWdFlGck5tMDJvWTFnMUpRUUYwYzNKTzZORXUifSx7InEtc2lnbi10aW1lIjoiMTU2NzA2NDM3NjsxNTY3MDcxNTc2In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQwOTozOTozNi4wODdaIn0=------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryYa6H7Gd4xuhlyfJbContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IkFLSUQ4QTBmQlZ0WUZyTm0wMm9ZMWcxSlFRRjBjM0pPNk5FdSJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0NDA3OzE1NjcwNzE2MDcifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjQwOjA3LjQ4OFoifQ==------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryJspR3QIUhGJLALwfContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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"eyJjb25kaXRpb25zIjpbeyJxLXNpZ24tYWxnb3JpdGhtIjoic2hhMSJ9LHsicS1hayI6IkFLSUQ4QTBmQlZ0WUZyTm0wMm9ZMWcxSlFRRjBjM0pPNk5FdSJ9LHsicS1zaWduLXRpbWUiOiIxNTY3MDY0NDM4OzE1NjcwNzE2MzgifV0sImV4cGlyYXRpb24iOiIyMDE5LTA4LTI5VDA5OjQwOjM4LjA5MloifQ==------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryX8hd2lxTMzIBk5LiContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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 in the object key (key
form field)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"eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJmb2xkZXIvc3ViZm9sZGVyLyJdLHsicS1zaWduLWFsZ29yaXRobSI6InNoYTEifSx7InEtYWsiOiJBS0lEOEEwZkJWdFlGck5tMDJvWTFnMUpRUUYwYzNKTzZORXUifSx7InEtc2lnbi10aW1lIjoiMTU2NzA4MjEwNzsxNTY3MDg5MzA3In1dLCJleHBpcmF0aW9uIjoiMjAxOS0wOC0yOVQxNDozNTowNy44OTlaIn0=------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryHrAMWZO4BNyT0rcaContent-Disposition: form-data; name="q-ak"AKID********************************------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 204Content-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****
success_action_redirect
form fieldPOST / 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"eyJjb25kaXRpb25zIjpbWyJzdGFydHMtd2l0aCIsIiRzdWNjZXNzX2FjdGlvbl9yZWRpcmVjdCIsImh0dHBzOi8vbXkud2Vic2l0ZS8iXSx7InEtc2lnbi1hbGdvcml0aG0iOiJzaGExIn0seyJxLWFrIjoiQUtJRDhBMGZCVnRZRnJObTAyb1kxZzFKUVFGMGMzSk82TkV1In0seyJxLXNpZ24tdGltZSI6IjE1NjcwNjU3NDk7MTU2NzA3Mjk0OSJ9XSwiZXhwaXJhdGlvbiI6IjIwMTktMDgtMjlUMTA6MDI6MjkuMjcyWiJ9------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryJ0bRH1MwgMq5eu6HContent-Disposition: form-data; name="q-ak"AKID********************************------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****
success_action_status
form fieldPOST / 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"eyJjb25kaXRpb25zIjpbeyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDAifSx7InEtc2lnbi1hbGdvcml0aG0iOiJzaGExIn0seyJxLWFrIjoiQUtJRDhBMGZCVnRZRnJObTAyb1kxZzFKUVFGMGMzSk82TkV1In0seyJxLXNpZ24tdGltZSI6IjE1NjcwNjU4Njk7MTU2NzA3MzA2OSJ9XSwiZXhwaXJhdGlvbiI6IjIwMTktMDgtMjlUMTA6MDQ6MjkuMzI3WiJ9------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-sign-algorithm"sha1------WebKitFormBoundaryST9Mz8AGzCDphgJFContent-Disposition: form-data; name="q-ak"AKID********************************------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 200Content-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****
Apakah halaman ini membantu?