Migrate to PresignedGetObject from PresignedGetPartialObject() as the latter was of no real use
This commit is contained in:
@@ -35,7 +35,7 @@ type Client interface {
|
||||
SetBucketACL(acl string) *probe.Error
|
||||
|
||||
// Object operations
|
||||
Share(expires time.Duration, offset, length int64) (string, *probe.Error)
|
||||
Share(expires time.Duration) (string, *probe.Error)
|
||||
GetObject(offset, length int64) (body io.ReadCloser, size int64, err *probe.Error)
|
||||
PutObject(size int64, data io.Reader) *probe.Error
|
||||
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ func (f *fsClient) get() (io.ReadCloser, int64, *probe.Error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *fsClient) Share(expires time.Duration, offset, length int64) (string, *probe.Error) {
|
||||
func (f *fsClient) Share(expires time.Duration) (string, *probe.Error) {
|
||||
return "", probe.NewError(client.APINotImplemented{API: "Share", APIType: "filesystem"})
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -102,9 +102,9 @@ func (c *s3Client) GetObject(offset, length int64) (io.ReadCloser, int64, *probe
|
||||
}
|
||||
|
||||
// Share - get a usable get object url to share
|
||||
func (c *s3Client) Share(expires time.Duration, offset, length int64) (string, *probe.Error) {
|
||||
func (c *s3Client) Share(expires time.Duration) (string, *probe.Error) {
|
||||
bucket, object := c.url2BucketAndObject()
|
||||
presignedURL, err := c.api.PresignedGetPartialObject(bucket, object, expires, offset, length)
|
||||
presignedURL, err := c.api.PresignedGetObject(bucket, object, expires)
|
||||
if err != nil {
|
||||
return "", probe.NewError(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user