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 {