feat: upload success
This commit is contained in:
@@ -28,6 +28,6 @@ DB = 0
|
||||
AccessKeyId = "LTAI5t86SjiP9zRd3q2w7jQN"
|
||||
AccessKeySecret = "hV7spvJuWh8w0EEIXj8NFi2uBlF4aS"
|
||||
Bucket ="rogee-test"
|
||||
Host ="abc"
|
||||
#Host ="abc"
|
||||
Region ="cn-beijing"
|
||||
CallbackURL = "https://localhost"
|
||||
CallbackURL = "https://www.baidu.com"
|
||||
|
||||
@@ -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