This commit is contained in:
cyk
2023-07-07 11:50:47 +08:00
parent 708b9f8c1f
commit 6d97c81836

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");