From 5fc28bc6b985f10d7c6bec342d6fd35195471efa Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Mon, 15 Nov 2021 10:36:23 +0800 Subject: [PATCH] fix chinese fileName bug --- modules/storage/obs.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/storage/obs.go b/modules/storage/obs.go index 239580adb..c25787703 100755 --- a/modules/storage/obs.go +++ b/modules/storage/obs.go @@ -6,6 +6,7 @@ package storage import ( "io" + "net/url" "path" "strconv" "strings" @@ -262,6 +263,7 @@ func GetObsCreateSignedUrl(jobName, parentDir, fileName string) (string, error) input.Method = obs.HttpMethodGet reqParams := make(map[string]string) + fileName = url.QueryEscape(fileName) reqParams["response-content-disposition"] = "attachment; filename=\"" + fileName + "\"" input.QueryParams = reqParams output, err := ObsCli.CreateSignedUrl(input)