上传篇代码片段:
import com.oreilly.servlet.MultipartRequest;
import java.util.Enumeration;
MultipartRequest multi = null;
ServletConfig config = super.getServletConfig();
int maxPostSize = 200 * 1024 * 1024;
multi = new MultipartRequest(request, filePath, maxPostSize, "utf-8");
fileName = multi.getParameter("fileName");
id = multi.getParameter("id");
Enumeration upLoadFiles = multi.getFileNames();
......
while (upLoadFiles.hasMoreElements()) {
String fName = (String) upLoadFiles.nextElement();
oldName = multi.getFilesystemName(fName);
}
....
String exg = oldName.substring(oldName.lastIndexOf("."));
// System.out.println("--------" + exg);
String fileSep = System.getProperty("file.separator");
File oldfile = new File(filePath + fileSep + oldName)
http://avery-leo.iteye.com/blog/210695
分享到:
相关推荐
Oreilly 上传组件源码Oreilly 上传组件源码Oreilly 上传组件源码
com.oreilly.servlet
Oreilly.HTML.And.XHTML.The.Definitive.Guide.5th.Edition学习笔记
Oreilly - Python Cookbook,python编程人员必备学习手册
Oreilly - Python Cookbook, 2nd Edition.chm
OReilly.Deep.Learning.2017
JavaPerformceTuning-Oreilly.pdf
这个是Java.Swing.OReilly
This is the source code referenced in the O'Reilly Online Course: Developing Android Applications with Java. More information can be found here: http://training.oreilly.com/androidapps-java/
OReilly.PHP.Cookbook.3rd.Edition
[O REILLY ] Introducing Istio Service Mesh for Microservice 英文原版,学习Istio好资料。
OReilly Microservice Architecture 2016. Microservices can have a positive impact on your enterprise—just ask Amazon and Netflix—but you can fall into many traps if you don’t approach them in the ...
Oreilly Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython Oct 20, 2017 最终版,完整版,清晰版,原版
学习opencv的一本经典英文教材,内容清晰,需要者自行下载,主要章节有: 1. Overview 2. Introduction to OpenCV 3. Getting to Know OpenCV 4、HighGUI 5. Image Processing 6. Image Transforms 7. Histograms ...
利用 Oreilly MultiPartRequest 解決 上傳檔案 的問題
OReilly - Python Cookbook