Merge remote-tracking branch 'origin/master'

This commit is contained in:
sjm
2023-07-07 12:18:13 +08:00

View File

@@ -39,7 +39,9 @@ public class UploadHandleServlet extends HttpServlet {
//得到上传文件的保存目录将上传的文件存放于WEB-INF目录下不允许外界直接访问保证上传文件的安全
String savePath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload");
savePath= this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"upload").replace("\\out\\artifacts\\hellogithub_war_exploded\\WEB-INF\\upload","\\web\\uploadFile");
System.out.println(savePath);
// savePath="D:\\Java\\helloG\\hellogithub\\web\\uploadFile";
// String savePath="E:\\Desktop\\out";
//上传时生成的临时文件保存目录
String tempPath = this.getServletContext().getRealPath(File.separator+"WEB-INF"+File.separator+"tmp");