From 22b4f727a4a7bcfd47914ef8f4b04a94af60b06e Mon Sep 17 00:00:00 2001 From: jojoliang Date: Wed, 22 Sep 2021 16:15:57 +0800 Subject: [PATCH] update PresignedURL --- cos.go | 2 +- object.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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,