java 上传附件的一点积累
摘要:1、第一种:File inFile = new File(downfileA);//downfileA是前台传过来的,文件路径String fileName = inFile.getName();String path = request.getSession().getServletContext().getRealPath("/");File outFile = new File(path); FileUtils.copyFile(new File(fileName), outFile);2、第二种:InputStream is = null;OutputStream
阅读全文
posted @ 2013-12-18 17:57