0006-00000210

更新时间:
复制 MD 格式

Problem description

The expiration field in the Post Policy is invalid.

Causes

When you submit a PostObject request using form upload, OSS validates the policy document attached to the request. The expiration field must be a string in ISO 8601 GMT format. Passing a numeric value (such as an integer) causes this error.

Examples

The following example shows an invalid policy document where expiration is set to a numeric value instead of an ISO 8601 string:

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

Solutions

Set expiration to a valid ISO 8601 GMT datetime string.

Valid `expiration` value:

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

References