Browse Source

Merge pull request '云脑2模型下载中文文件时文件名错误' (#804) from download-model-error into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/804
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
pull/817/head
ychao_1983 3 years ago
parent
commit
f62175c6fb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modules/storage/obs.go

+ 2
- 0
modules/storage/obs.go View File

@@ -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)


Loading…
Cancel
Save