From dce0a96dea8bb2924e0ba68b497d507dca741975 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Mon, 26 Aug 2024 21:41:28 +0800 Subject: [PATCH] feat: improve uploaded file URL --- object/storage.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/object/storage.go b/object/storage.go index 7f358df2..cdf3fb67 100644 --- a/object/storage.go +++ b/object/storage.go @@ -100,12 +100,13 @@ func GetUploadFileUrl(provider *Provider, fullFilePath string, hasTimestamp bool fileUrl := "" if host != "" { - fileUrl = util.UrlJoin(host, escapePath(objectKey)) + // fileUrl = util.UrlJoin(host, escapePath(objectKey)) + fileUrl = util.UrlJoin(host, objectKey) } - if fileUrl != "" && hasTimestamp { - fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime()) - } + // if fileUrl != "" && hasTimestamp { + // fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime()) + // } if provider.Type == ProviderTypeTencentCloudCOS { objectKey = escapePath(objectKey)