feat: upload success
This commit is contained in:
@@ -33,11 +33,11 @@ func (c *Config) GetToken(path string) (*PolicyToken, error) {
|
||||
SetType("access_key").
|
||||
SetAccessKeyId(c.AccessKeyId).
|
||||
SetAccessKeySecret(c.AccessKeySecret).
|
||||
SetPolicy("")
|
||||
SetPolicy("").
|
||||
SetRoleSessionExpiration(3600)
|
||||
// SetType("ram_role_arn").
|
||||
// SetRoleArn(os.Getenv("OSS_STS_ROLE_ARN")).
|
||||
// SetRoleSessionName("Role_Session_Name").
|
||||
// SetRoleSessionExpiration(3600)
|
||||
|
||||
// 根据配置创建凭证提供器
|
||||
provider, err := credentials.NewCredential(config)
|
||||
@@ -105,7 +105,7 @@ func (c *Config) GetToken(path string) (*PolicyToken, error) {
|
||||
callbackParam.CallbackBodyType = "application/x-www-form-urlencoded"
|
||||
callback_str, err := json.Marshal(callbackParam)
|
||||
if err != nil {
|
||||
fmt.Println("callback json err:", err)
|
||||
return nil, errors.Wrap(err, "callback json err:")
|
||||
}
|
||||
callbackBase64 := base64.StdEncoding.EncodeToString(callback_str)
|
||||
// 构建返回给前端的表单
|
||||
|
||||
Reference in New Issue
Block a user