0002-00000705
Problem description
The signature in the PostObject request does not match the signature calculated by Object Storage Service (OSS).
Causes
You initiated a PostObject request that includes a signature, but the signature in the PostObject request does not match the signature calculated by OSS. The following scenarios may occur:
-
If the default V1 signature or the Amazon S3-compatible V2 signature is included in the PostObject request, the signature must be specified in the
Signatureform field. -
If the V2 or V4 signature is included in the PostObject request, the signature must be specified in the
x-oss-signatureform field. -
If the Amazon S3-compatible V4 signature is included in the PostObject request, the signature must be specified in the
x-amz-signatureform field.
Examples
You initiated a PostObject request that includes a default V1 signature, but the value of the Signature form field is invalid.
Solutions
To add a calculated signature to the form field, perform the following steps:
-
Create a policy that is encoded in
UTF-8. -
Encode the policy in
Base64. The encoding result is the value of the policy form field, and this value is used as the string-to-sign. -
Use
AccessKeySecretto sign the string-to-sign.Signature = base64(hmac-sha1(AccessKeySecret, base64(policy))) -
The following sample code provides an example on how to specify the calculated signature in the
Signatureform field.Content-Disposition: form-data; name="Signature" {signature} --9431149156168
For more information, see PostObject.
References
You can also refer to the following topics to initiate a PostObject request that includes the signature: