Problem description
The policy form field is missing from a PostObject request.
Causes
A PostObject request was sent with signature authentication, but the policy form field was not included. When uploading objects by calling the PostObject operation with signature, the policy form field is required — OSS uses the policy document to verify that the request meets the specified conditions before allowing the upload.
Examples
The following request includes OSSAccessKeyId and Signature but omits the policy field:
POST / HTTP/1.1
Host: <bucket-name>.oss-<region>.aliyuncs.com
Content-Type: multipart/form-data; boundary=----FormBoundary
------FormBoundary
Content-Disposition: form-data; name="OSSAccessKeyId"
<your-access-key-id>
------FormBoundary
Content-Disposition: form-data; name="Signature"
<calculated-signature>
------FormBoundary
Content-Disposition: form-data; name="key"
<object-key>
------FormBoundary
Content-Disposition: form-data; name="file"; filename="example.txt"
Content-Type: text/plain
<file-content>
------FormBoundary--This request is missing the policy form field that is required when signature authentication is used.
Solutions
Add the policy form field to the PostObject request. When uploading with signature, you must include the policy field together with the other signature-related fields:
| Form field | Role | Required |
|---|---|---|
OSSAccessKeyId | Identifies your Alibaba Cloud account | Conditional — required when policy is present |
policy | Defines the conditions the request must satisfy | Required when uploading with signature |
Signature | Signature of the policy document | Conditional — required when policy is present |
The policy value is a Base64-encoded, UTF-8 JSON document that specifies the conditions the PostObject request must meet.
For the full list of supported policy conditions and signature calculation steps, see PostObject.