0006-00000215

更新时间:
复制 MD 格式

Problem description

The conditions parameter in the Post Policy form field contains an empty list.

Causes

When you call PostObject to upload an object via form upload, the value of the conditions parameter in the policy form field is an empty list, which is invalid.

Examples

The following policy is invalid because conditions is an empty list:

{
    "expiration": "2023-02-19T13:19:00.000Z",
    "conditions": []
}

Solutions

Add at least one condition to the conditions list. The following policy is valid:

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

References