Jay
2024-11-12 3d9106399d9a2b9c8ba7d2dea621f54fd71d2ca7
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, ""));