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
For the full reference of the
policyform field, see Appendix: Policy.For an end-to-end guide on browser-based form upload, see Add signatures on the client by using JavaScript and upload data to OSS.
For other common PostObject errors, see Errors and troubleshooting methods of PostObject.
该文章对您有帮助吗?