0007-00000002

更新时间:
复制 MD 格式

Problem description

The Callback parameter value cannot be Base64-decoded on the server side.

Causes

The Callback parameter value must be a JSON string encoded in Base64. This requirement applies to all three locations where the parameter can appear:

LocationParameterRequired format
URL query stringCallbackBase64-encoded JSON string
Request headerx-oss-callbackBase64-encoded JSON string
POST form fieldcallbackBase64-encoded JSON string

If the server cannot Base64-decode the value in any of these locations, OSS returns the error.

Examples

The following request triggers the error because x-oss-callback is set to x123-*&, which is not a valid Base64-encoded JSON string:

PUT /test.txt HTTP/1.1
Host: callback-test.oss-cn-hanghzou.aliyuncs.com
Content-Length: 4
x-oss-callback-var: eyJ4Om15X3ZhciI6ImZvci1jYWxsYmFjay10ZXN****=
x-oss-callback: x123-*&
Date: Sun, 19 Feb 2023 09:42:14 GMT
Content-Type: text/plain
Authorization: OSS qn6q**************:77Dv****************
Test

Solutions

Set the Callback parameter to a valid Base64-encoded JSON string. For the required JSON structure and how to construct the value, see Callback.

References