|
|
@@ -480,7 +480,7 @@ func GetObsCreateSignedUrlByBucketAndKey(bucket, key string) (string, error) { |
|
|
|
filename = key[comma+1:] |
|
|
|
} |
|
|
|
reqParams := make(map[string]string) |
|
|
|
filename = url.QueryEscape(filename) |
|
|
|
filename = url.PathEscape(filename) |
|
|
|
reqParams["response-content-disposition"] = "attachment; filename=\"" + filename + "\"" |
|
|
|
input.QueryParams = reqParams |
|
|
|
output, err := ObsCli.CreateSignedUrl(input) |
|
|
@@ -503,6 +503,7 @@ func ObsGetPreSignedUrl(uuid, fileName string) (string, error) { |
|
|
|
input.Bucket = setting.Bucket |
|
|
|
input.Expires = 60 * 60 |
|
|
|
|
|
|
|
fileName = url.PathEscape(fileName) |
|
|
|
reqParams := make(map[string]string) |
|
|
|
reqParams["response-content-disposition"] = "attachment; filename=\"" + fileName + "\"" |
|
|
|
input.QueryParams = reqParams |
|
|
|