Skip to content

Commit 22b4f72

Browse files
author
jojoliang
committed
update PresignedURL
1 parent 580b15a commit 22b4f72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
const (
2424
// Version current go sdk version
25-
Version = "0.7.31"
25+
Version = "0.7.32"
2626
userAgent = "cos-go-sdk-v5/" + Version
2727
contentTypeXML = "application/xml"
2828
defaultServiceBaseURL = "http://service.cos.myqcloud.com"

object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ type PresignedURLOptions struct {
122122
func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, ak, sk string, expired time.Duration, opt interface{}) (*url.URL, error) {
123123
sendOpt := sendOptions{
124124
baseURL: s.client.BaseURL.BucketURL,
125-
uri: "/" + encodeURIComponent(name),
125+
uri: "/" + encodeURIComponent(name, []byte{'/'}),
126126
method: httpMethod,
127127
optQuery: opt,
128128
optHeader: opt,

0 commit comments

Comments
 (0)