Browse Source
Merge pull request #155 from agin719/cos-v4-dev
update PresignedURL
master
agin719
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
cos.go
-
object.go
|
|
@ -22,7 +22,7 @@ import ( |
|
|
|
|
|
|
|
const ( |
|
|
|
// Version current go sdk version
|
|
|
|
Version = "0.7.31" |
|
|
|
Version = "0.7.32" |
|
|
|
userAgent = "cos-go-sdk-v5/" + Version |
|
|
|
contentTypeXML = "application/xml" |
|
|
|
defaultServiceBaseURL = "http://service.cos.myqcloud.com" |
|
|
|
|
|
@ -122,7 +122,7 @@ type PresignedURLOptions struct { |
|
|
|
func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, ak, sk string, expired time.Duration, opt interface{}) (*url.URL, error) { |
|
|
|
sendOpt := sendOptions{ |
|
|
|
baseURL: s.client.BaseURL.BucketURL, |
|
|
|
uri: "/" + encodeURIComponent(name), |
|
|
|
uri: "/" + encodeURIComponent(name, []byte{'/'}), |
|
|
|
method: httpMethod, |
|
|
|
optQuery: opt, |
|
|
|
optHeader: opt, |
|
|
|