Problem description
The Signature form field is missing from a PostObject request.
Causes
The PostObject request includes a signature, but the signature value is not placed in the correct form field. Each signature version requires a specific form field name.
| Signature version | Required form field |
|---|---|
| Default V1 signature | Signature |
| Amazon S3-compatible V2 signature | Signature |
| OSS-native V2 or V4 signature | x-oss-signature |
| Amazon S3-compatible V4 signature | x-amz-signature |
Examples
A PostObject request uses the default V1 signature, but the Signature form field is missing from the request body.
Solutions
Place the calculated signature value in the form field that matches your signature version: Signature, x-oss-signature, or x-amz-signature.
The following steps show how to add the signature for the default V1 signature, which uses the Signature form field.
Create a policy encoded in UTF-8.
Encode the policy in Base64. The Base64-encoded value is both the
policyform field value and the string-to-sign.Sign the string-to-sign with your
AccessKeySecret:Signature = base64(hmac-sha1(AccessKeySecret, base64(policy)))Set the calculated signature as the value of the
Signatureform field:Content-Disposition: form-data; name="Signature" {signature} --9431149156168
For the complete PostObject request format, see PostObject.
References
SDK examples for constructing a signed PostObject request: