|
|
@@ -662,7 +662,8 @@ func ModelConvertDownloadModel(ctx *context.Context) { |
|
|
|
ctx.ServerError("no file to download.", err) |
|
|
|
} |
|
|
|
} else { |
|
|
|
Prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, job.ID, "output/", "V0001", ""), "/") |
|
|
|
Prefix := path.Join(setting.TrainJobModelPath, job.ID, "output/", "V0001", "") + "/" |
|
|
|
log.Info("bucket=" + setting.Bucket + "prefix=" + Prefix) |
|
|
|
allFile, err := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, Prefix) |
|
|
|
if err == nil { |
|
|
|
returnFileName := job.Name + ".zip" |
|
|
@@ -696,7 +697,7 @@ func ModelConvertDownloadModel(ctx *context.Context) { |
|
|
|
ctx.ServerError("GetObsCreateSignedUrl", err) |
|
|
|
return |
|
|
|
} |
|
|
|
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusMovedPermanently) |
|
|
|
http.Redirect(ctx.Resp, ctx.Req.Request, url, http.StatusTemporaryRedirect) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|