Ver código fonte

上传资源打印日志

dengsixing 2 anos atrás
pai
commit
ef0fd02620

+ 13 - 0
src/main/java/com/fdkankan/contro/controller/SceneFileController.java

@@ -78,4 +78,17 @@ public class SceneFileController{
                          String params) throws Exception {
         return sceneFileBuildService.uploadFile(file, params);
     }
+
+    /**
+     * 单个文件上传
+     * @param file
+     * @param params
+     * @return
+     */
+    @PostMapping("testUpload")
+    public ResultData testUpload(@RequestParam(value = "file",required = false) MultipartFile file,
+        String params) throws Exception {
+        file.transferTo(new File("/home/backend/tomcat/modeling-control/logs/" + file.getOriginalFilename()));
+        return ResultData.ok();
+    }
 }