From 5521318baa53978aa2c2ed090b25a2eed15ecec0 Mon Sep 17 00:00:00 2001 From: zouap Date: Thu, 7 Jul 2022 11:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_convert.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/ai_model_convert.go b/routers/repo/ai_model_convert.go index 538cf2f69..71a6075cd 100644 --- a/routers/repo/ai_model_convert.go +++ b/routers/repo/ai_model_convert.go @@ -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 {