我通过go sdk上传文件,设置了回调地址和参数,但是执行完毕就提示错误“json: cannot unmarshal string into Go value of type storage.PutRet”,虽然提示错误,但是事实上能够成功执行回调的接口和解析出参数。
callbackURL := "xxx.xxx.xxx"
callbackBody := fmt.Sprintf("{\"key\":\"$(key)\",\"token\":\"%s\"}", "123")
putPolicy := storage.PutPolicy{
Scope: Bucket,
CallbackURL: callbackURL,
CallbackBody: callbackBody,
CallbackBodyType: "application/json",
}
请问这是什么原因呢?我试过application/x-www-form-urlencoded的方式也同样是这样
返回的Body和storeage.PutRet结构不匹配