0006-00000208

更新时间:
复制 MD 格式

Problem description

A PostObject request fails because the policy form field is missing the required expiration field.

Causes

The policy form field in a PostObject request must always contain both the expiration and conditions fields. If either field is absent, OSS rejects the request with an error.

Examples

The following policy is missing the expiration field and causes the error:

{
    "conditions": [
        ["content-length-range", 0, 1048576000]
    ]
}

Solutions

Add the expiration field to the policy JSON. The expiration field specifies when the policy expires, in ISO 8601 GMT format. For example, 2023-02-19T13:19:00.000Z means the policy is no longer valid after 13:19:00 UTC on February 19, 2023. Set this value far enough in the future to cover your upload window.

{
    "expiration": "2023-02-19T13:19:00.000Z",
    "conditions": [
        ["content-length-range", 0, 1048576000]
    ]
}

References