public void upload(){
RespBody resp = new RespBody();
try {
UploadFile file = getFile();
System.out.println("--------file--------");
File delfile = new File(file.getUploadPath()+"\\"+file.getFileName());
System.out.println("=========="+delfile.getPath());
resp.setResult(true);
Map<String ,String> map = new HashMap<String, String>();
map.put("filePath", delfile.getPath());
map.put("fileSize", delfile.length()/1024+"");
resp.setData(map);
} catch (Exception e) {
e.printStackTrace();
resp.setMsg("文件上传失败");
}
renderJson(resp);
}