//获得文件名后缀,生成新的文件名
public String getNewName(String oldName){
String substring = oldName.substring(oldName.lastIndexOf("."));
String s = UUID.randomUUID().toString();
return s+substring;
}
//得到真实路径
public String getRealPath(HttpServletRequest request,String filePath){
String realPath=request.getSession().getServletContext().getRealPath(filePath);
File file = new