From 3d9106399d9a2b9c8ba7d2dea621f54fd71d2ca7 Mon Sep 17 00:00:00 2001
From: Jay <csj123456>
Date: 星期二, 12 十一月 2024 10:56:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
index ceeac24..a3cd858 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/MmPredictItemController.java
@@ -1,5 +1,6 @@
 package com.iailab.module.model.mcs.pre.controller.admin;
 
+import cn.hutool.core.io.FileUtil;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
 import com.iailab.framework.common.pojo.CommonResult;
 import com.iailab.framework.common.pojo.PageResult;
@@ -132,6 +133,7 @@
     @PostMapping("/upload-model")
     public CommonResult<Map<String, Object>> uploadModel(@RequestParam("file") MultipartFile file) throws Exception {
         String uploadDir = modelPath + file.getOriginalFilename();
+        FileUtil.mkParentDirs(uploadDir);
         file.transferTo(new File(uploadDir));
         Map<String, Object> result = iAILModelUtil.parseModel(uploadDir);
         result.put("originalFilename", file.getOriginalFilename().replace(CommonConstant.MDK_SUFFIX, ""));

--
Gitblit v1.9.3