Jinquan_Ou
2023-03-19 d959c9a23a536d7d73bbc1a3839aaacb2f7721c8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -6,6 +6,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import com.ruoyi.service.DownLoadFileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +35,9 @@
    @Autowired
    private ServerConfig serverConfig;
    @Autowired
    private DownLoadFileService downLoadFileService;
    private static final String FILE_DELIMETER = ",";
@@ -69,11 +73,17 @@
        }
    }
    @PostMapping("/downLoadFile")
    public AjaxResult downLoadFile(@RequestBody String path,HttpServletResponse response) throws Exception {
        return downLoadFileService.downLoadFile(path,response);
    }
    /**
     * 通用上传请求(单个)
     */
    @PostMapping("/upload")
    public AjaxResult uploadFile(MultipartFile file) throws Exception
    public AjaxResult uploadFile(@RequestParam("uploadFile") MultipartFile file) throws Exception
    {
        try
        {