From 220aeed5883b4afbd65d29814bc6f5f274994877 Mon Sep 17 00:00:00 2001 From: namhq1989 Date: Sun, 8 Jan 2023 18:59:27 +0700 Subject: [PATCH] add get presigned url logs --- presigned_url.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/presigned_url.go b/presigned_url.go index be71528..2a02fc8 100644 --- a/presigned_url.go +++ b/presigned_url.go @@ -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 "" }