add get presigned url logs
This commit is contained in:
parent
1b6405dc25
commit
220aeed588
|
@ -3,7 +3,6 @@ package minio
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -14,15 +13,14 @@ func (c Client) GetPresignedURL(ctx context.Context, bucket, object string, expi
|
|||
}
|
||||
|
||||
// params
|
||||
reqParams := make(url.Values)
|
||||
reqParams.Set("response-content-disposition", fmt.Sprintf("attachment; filename=\"%s\"", object))
|
||||
//reqParams := make(url.Values)
|
||||
//reqParams.Set("response-content-disposition", fmt.Sprintf("attachment; filename=\"%s\"", object))
|
||||
|
||||
// get
|
||||
presignedURL, err := c.client.PresignedGetObject(context.Background(), bucket, object, expiry, reqParams)
|
||||
fmt.Println("presignedURL", presignedURL)
|
||||
presignedURL, err := c.client.PresignedGetObject(context.Background(), bucket, object, expiry, nil)
|
||||
if err != nil {
|
||||
fmt.Printf("[minio.GetPresignedURL][%s] get object %s error: %s \n", bucket, object, err.Error())
|
||||
fmt.Printf("params %v \n", reqParams)
|
||||
//fmt.Printf("params %v \n", reqParams)
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue