Problem description
A PostObject request fails because the policy form field is missing the required expiration and conditions fields.
Causes
The policy form field must always contain both expiration and conditions. A PostObject request that includes a policy without these two fields is malformed and returns a request error.
Examples
The following policy value triggers the error — it is valid JSON but omits both required fields:
{
}Solutions
Add both expiration and conditions to the policy form field. The expiration field sets when the policy expires (ISO 8601 format), and conditions is an array of upload constraints.
{
"expiration": "2023-02-19T13:19:00.000Z",
"conditions": [
["content-length-range", 0, 1048576000]
]
}References
For the full
policyfield specification, see the "Appendix: Policy" section of PostObject.To transfer data from a web client to Object Storage Service (OSS) using form upload, see Add signatures on the client by using JavaScript and upload data to OSS.
For common PostObject errors and troubleshooting guidance, see PostObject error handling.