Browse Source

Merge pull request #155 from agin719/cos-v4-dev

update PresignedURL
master
agin719 3 years ago
committed by GitHub
parent
commit
19a274db81
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cos.go
  2. 2
      object.go

2
cos.go

@ -22,7 +22,7 @@ import (
const ( const (
// Version current go sdk version // Version current go sdk version
Version = "0.7.31"
Version = "0.7.32"
userAgent = "cos-go-sdk-v5/" + Version userAgent = "cos-go-sdk-v5/" + Version
contentTypeXML = "application/xml" contentTypeXML = "application/xml"
defaultServiceBaseURL = "http://service.cos.myqcloud.com" defaultServiceBaseURL = "http://service.cos.myqcloud.com"

2
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) { func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, ak, sk string, expired time.Duration, opt interface{}) (*url.URL, error) {
sendOpt := sendOptions{ sendOpt := sendOptions{
baseURL: s.client.BaseURL.BucketURL, baseURL: s.client.BaseURL.BucketURL,
uri: "/" + encodeURIComponent(name),
uri: "/" + encodeURIComponent(name, []byte{'/'}),
method: httpMethod, method: httpMethod,
optQuery: opt, optQuery: opt,
optHeader: opt, optHeader: opt,

Loading…
Cancel
Save