Sfoglia il codice sorgente

修改文件后返回新地址

Danj0rr 1 anno fa
parent
commit
5ee407a754

+ 4 - 1
src/main/java/com/kexun/controller/FileUploadController.java

@@ -1,5 +1,6 @@
 package com.kexun.controller;
 
+import com.alibaba.fastjson.JSONObject;
 import com.kexun.entity.ModelEntity;
 import org.apache.commons.io.FileUtils;
 
@@ -99,8 +100,10 @@ public class FileUploadController {
         modelEntity.setFilePath(filePath);
         userModelService.updateById(modelEntity);
 
+        JSONObject resJson=new JSONObject();
+        resJson.put("file_path", filePath);
 
-        return Result.success();
+        return Result.success("ok", resJson);
     }
 
     //上传用户模型及审批结果