diff --git a/cos.go b/cos.go index 8a9e820..e42806c 100644 --- a/cos.go +++ b/cos.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" diff --git a/object.go b/object.go index 6e7d9f5..0177b83 100644 --- a/object.go +++ b/object.go @@ -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,