Browse Source

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

add get object url
master
agin719 4 years ago
committed by GitHub
parent
commit
12e3633aaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      object.go

5
object.go

@ -107,6 +107,11 @@ func (s *ObjectService) GetToFile(ctx context.Context, name, localpath string, o
return resp, nil
}
func (s *ObjectService) GetObjectURL(name string) *url.URL {
uri, _ := url.Parse("/" + encodeURIComponent(name, []byte{'/'}))
return s.client.BaseURL.BucketURL.ResolveReference(uri)
}
type PresignedURLOptions struct {
Query *url.Values `xml:"-" url:"-" header:"-"`
Header *http.Header `header:"-,omitempty" url:"-" xml:"-"`

Loading…
Cancel
Save