|
|
@@ -2893,15 +2893,19 @@ func TrainJobDownloadLogFile(ctx *context.Context) { |
|
|
|
ctx.ServerError("GetObsLogFileName", err) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
url, err := storage.GetObsCreateSignedUrlByBucketAndKey(setting.Bucket, key) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetObsCreateSignedUrlByBucketAndKey failed: %v", err.Error(), ctx.Data["msgID"]) |
|
|
|
ctx.ServerError("GetObsCreateSignedUrlByBucketAndKey", err) |
|
|
|
return |
|
|
|
if len(key) > 1 { |
|
|
|
ObsDownloadManyFile("", ctx, task.DisplayJobName+".zip", key) |
|
|
|
} else { |
|
|
|
url, err := storage.GetObsCreateSignedUrlByBucketAndKey(setting.Bucket, key[0].FileName) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetObsCreateSignedUrlByBucketAndKey failed: %v", err.Error(), ctx.Data["msgID"]) |
|
|
|
ctx.ServerError("GetObsCreateSignedUrlByBucketAndKey", err) |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.Resp.Header().Set("Cache-Control", "max-age=0") |
|
|
|
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect) |
|
|
|
} |
|
|
|
ctx.Resp.Header().Set("Cache-Control", "max-age=0") |
|
|
|
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect) |
|
|
|
|
|
|
|
} |
|
|
|
func getDatasUrlListByUUIDS(uuidStr string) ([]models.Datasurl, string, string, bool, error) { |
|
|
|
var isMultiDataset bool |
|
|
|