| | |
| | | boolean isSuccess = false;
|
| | | String loadpath = ActionUtil.getSession().getServletContext().getRealPath("/");
|
| | | String str = new File(loadpath).getParentFile().getAbsolutePath(); //获取服务器所在的绝对路径
|
| | | String root = str+"/"+fileRoot+"/"+binf.getStationId()+"/video/"; // 上传路径
|
| | | String root = str+"/"+fileRoot+"/"+binf.getStationId()+"/"+binf.getVideoOrImage()+"/"; // 上传路径
|
| | | for(int i=0;i<file.length && binf != null;i++){
|
| | | String filePath = root+fileFileName[i];
|
| | | createFilefolderIFNotExist(filePath);
|
| | |
| | | String loadpath = ActionUtil.getSession().getServletContext().getRealPath("/");
|
| | | String str = new File(loadpath).getParentFile().getAbsolutePath();
|
| | | if(binf != null && binf.getStationId() != null && binf.getStationName() != null){
|
| | | String filesource = str+File.separator+fileRoot+File.separator+binf.getStationId()+File.separator+binf.getStationName()+File.separator; //当前请求的机房所在的资源文件夹
|
| | | String filesource = str+File.separator+fileRoot+File.separator+binf.getStationId()+File.separator+binf.getVideoOrImage()+File.separator; //当前请求的机房所在的资源文件夹
|
| | | //System.out.println(filesource);
|
| | | File source = new File(filesource);
|
| | | File[] files = source.listFiles();
|