Browse Source

add get object url

master
jojoliang 4 years ago
parent
commit
7ce6b293d5
  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