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