All Products
Search
Document Center

Object Storage Service:0006-00000222

Last Updated:Jul 21, 2023

Problem description

A condition that is specified by the conditions parameter in the policy form field is not of the map or list type.

Causes

You initiated a PostObject request to upload an object. However, a condition that is specified by the conditions parameter in the policy form field is not of the map or list type. As a result, an error is returned.

Examples

The error is returned because the first condition that is specified by the conditions parameter in the policy form field is 123. Each condition that is specified by the conditions parameter in the policy form field must be of the map or list type.

{
    "expiration": "2023-02-19T13:19:00.000Z",
    "conditions": [
      	123,
      	["content-length-range", 10, 1024]
    ]
}

Solutions

Make sure that each item that is specified by the conditions parameter in the policy form field is a condition of the map or list type.

{
    "expiration": "2023-02-19T13:19:00.000Z",
		"conditions": [    
        ["content-length-range", 1, 1024],
        ["eq", "$success_action_status", "201"],
        ["starts-with", "$key", "user/eric/"],
        ["in", "$content-type", ["image/jpg", "image/png"]],
        ["not-in", "$cache-control", ["no-cache"]]
  	]
}

References