Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
5521318baa
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/repo/ai_model_convert.go

+ 2
- 2
routers/repo/ai_model_convert.go View File

@@ -662,7 +662,7 @@ func ModelConvertDownloadModel(ctx *context.Context) {
ctx.ServerError("no file to download.", err)
}
} else {
Prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, job.CloudBrainTaskId, "output/", "V0001", ""), "/")
Prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, job.ID, "output/", "V0001", ""), "/")
allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, Prefix)
if err == nil {
returnFileName := job.Name + ".zip"
@@ -688,7 +688,7 @@ func ModelConvertDownloadModel(ctx *context.Context) {
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect)
} else {
//TODO
ObjectKey := path.Join(setting.TrainJobModelPath, job.CloudBrainTaskId, "output/", "V0001", parentDir, fileName)
ObjectKey := path.Join(setting.TrainJobModelPath, job.ID, "output/", "V0001", parentDir, fileName)
log.Info("ObjectKey=" + ObjectKey)
url, err := storage.GetObsCreateSignedUrlByBucketAndKey(setting.Bucket, ObjectKey)
if err != nil {


Loading…
Cancel
Save