From f8db798af62c8b3eebede72c94b84932cfce52c6 Mon Sep 17 00:00:00 2001 From: namhq1989 Date: Thu, 12 Jan 2023 16:26:22 +0700 Subject: [PATCH] fix content type for video --- presigned_url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presigned_url.go b/presigned_url.go index 7cb699c..ea7513d 100644 --- a/presigned_url.go +++ b/presigned_url.go @@ -20,7 +20,7 @@ func (c Client) GetPresignedURL(ctx context.Context, bucket, object, fileType st // add content type for video if fileType == ListTypes.Video { - parts := strings.Split(object, ".")[1] + parts := strings.Split(object, ".") reqParams.Set("response-content-type", fmt.Sprintf("video/%s", parts[len(parts)-1])) }