Problem description
The expiration field in the PostObject policy form field is set to an empty string.
Causes
The PostObject request includes a policy form field where expiration is an empty string. OSS requires expiration to be a valid timestamp, so the request is rejected.
Examples
The following policy triggers this error because expiration is an empty string:
{
"expiration": "",
"conditions": [
["content-length-range", 0, 1048576000]
]
}Solutions
Set expiration to a valid ISO 8601 timestamp in GMT. For example, "2023-02-19T13:19:00.000Z" represents February 19, 2023 at 13:19 GMT.
{
"expiration": "2023-02-19T13:19:00.000Z",
"conditions": [
["content-length-range", 0, 1048576000]
]
}References
Appendix: Policy —
policyform field structure and parametersAdd signatures on the client by using JavaScript and upload data to OSS — form upload from a web client
Errors and troubleshooting methods of PostObject — other common PostObject errors
该文章对您有帮助吗?