Browse Source

Merge remote-tracking branch 'origin/V20220415' into fix-1852

tags/v1.22.4.1^2
chenyifan01 4 years ago
parent
commit
4e7e40c3ee
3 changed files with 4 additions and 3 deletions
  1. +2
    -1
      modules/storage/obs.go
  2. +1
    -1
      routers/repo/modelarts.go
  3. +1
    -1
      templates/repo/modelarts/notebook/show.tmpl

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

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


+ 1
- 1
routers/repo/modelarts.go View File

@@ -279,7 +279,7 @@ func NotebookShow(ctx *context.Context) {
}
}

datasetDownloadLink := "-"
datasetDownloadLink := ""
if ctx.IsSigned {
if task.Uuid != "" && task.UserID == ctx.User.ID {
attachment, err := models.GetAttachmentByUUID(task.Uuid)


+ 1
- 1
templates/repo/modelarts/notebook/show.tmpl View File

@@ -119,7 +119,7 @@ td, th {
width: 800px;
overflow: hidden;
text-overflow: ellipsis;
height: 80px;
height: 20%;
word-break: break-all;
}
.redo-color{


Loading…
Cancel
Save