mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-13 05:25:59 +08:00
s3 AccessURL
This commit is contained in:
@@ -232,7 +232,7 @@ func (c *Cos) ListUploadedParts(ctx context.Context, uploadID string, name strin
|
||||
}
|
||||
|
||||
func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) {
|
||||
reqParams := make(url.Values)
|
||||
//reqParams := make(url.Values)
|
||||
//if opt != nil {
|
||||
// if opt.ContentType != "" {
|
||||
// reqParams.Set("Content-Type", opt.ContentType)
|
||||
@@ -246,7 +246,7 @@ func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration,
|
||||
} else if expire < time.Second {
|
||||
expire = time.Second
|
||||
}
|
||||
rawURL, err := c.client.Object.GetPresignedURL(ctx, http.MethodGet, name, c.credential.SecretID, c.credential.SecretKey, expire, reqParams)
|
||||
rawURL, err := c.client.Object.GetPresignedURL(ctx, http.MethodGet, name, c.credential.SecretID, c.credential.SecretKey, expire, nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user