0002-00000704

Updated at: 2023-07-21 07:18

Problem description

The Signature form field in a PostObject request is left empty.

Causes

You initiated a PostObject request that included the signature, but the Signature form field is left empty. 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 Signature form field.

  • If the V2 or V4 signature is included in the PostObject request, the signature must be specified in the x-oss-signature form field.

  • If the Amazon S3-compatible V4 signature is included in the PostObject request, the signature must be specified in the x-amz-signature form field.

Examples

You initiated a PostObject request that included the default V1 signature, but the Signature form field is missing.

Solutions

The calculated signature value is specified in one of the following form fields based on the signature version that you selected: Signature, x-oss-signature, or x-amz-signature.

To add a calculated signature to the form field, perform the following steps:

  1. Create a policy that is encoded in UTF-8.

  2. 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.

  3. Use AccessKeySecret to sign the string-to-sign.

    Signature = base64(hmac-sha1(AccessKeySecret, base64(policy)))
  4. The following sample code provides an example on how to specify the calculated signature in the Signature form 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:

  • On this page (1, T)
  • Problem description
  • Causes
  • Examples
  • Solutions
  • References
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare