资源简介
html5多文件上传前后台脚本和后台控制类
代码片段和文件信息
package cn.softmr.foms.order.controler;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import cn.softmr.util.keygen.SerialGeneratorMgr;
/**
* 导入3种excel解析
* @author gengmingming
*
*/
@Controller
@RequestMapping(value = “/product“)
public class ProductController {
@Resource
private SerialGeneratorMgr serialGeneratorMgr;
/** 日志实例 */
private static final Logger logger = Logger.getLogger(ProductController.class);
@RequestMapping(value = “/productList“ method = RequestMethod.GET)
public String orderImportList(ModelMap model) {
logger.info(“--- 商品管理 ---“);
return “product/MyHtml“;
}
/**
* 解析excel
* @param orderImportFile
* @param orderSource
* @param request
* @return
*/
@RequestMapping(value = “/parseProduct“method=RequestMethod.POST)
@ResponseBody
public object parseProduct(@RequestParam(“fileselect[]“) List fileselect) {
for (int i = 0; i < fileselect.size(); i++) {
CommonsMultipartFile orderImportFile = fileselect.get(i);
String suffix = orderImportFile.getFileItem().getName();
System.out.println(“suffix:“+suffix);
}
Mapject> map = null;
return map;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 934 2013-02-21 15:28 html5uploader\demo.html
文件 856 2013-02-21 12:04 html5uploader\html5uploader.css
文件 1537 2013-01-23 10:39 html5uploader\images\btnbg.png
文件 220 2013-01-19 17:41 html5uploader\images\jdt.png
文件 7945 2013-02-21 15:26 html5uploader\jquery.html5uploader.js
文件 93637 2013-01-19 17:41 html5uploader\jquery.js
文件 303 2013-02-21 11:31 html5uploader\readme.txt
文件 1836 2016-12-07 14:40 html5uploader\ProductController.java
文件 1834 2016-12-07 14:40 html5uploader\MyHtml.jsp
目录 0 2013-02-21 11:12 html5uploader\images
目录 0 2013-02-21 11:16 html5uploader\uploads
目录 0 2013-02-21 15:28 html5uploader
----------- --------- ---------- ----- ----
109102 12
评论
共有 条评论