81041
2018-11-20 0857c57ccb4b0c0fb5121b8769c2e80700259c46
修改视频上传
2个文件已修改
12 ■■■■ 已修改文件
gx_tieta/src/com/fgkj/actions/MyFileAction.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dto/BattInf.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/MyFileAction.java
@@ -183,7 +183,7 @@
        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);
@@ -212,7 +212,7 @@
        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();
gx_tieta/src/com/fgkj/dto/BattInf.java
@@ -85,6 +85,7 @@
    
    private Battinf_ex binf_ex;
    
    private String VideoOrImage ;//上传文件的格式
    public BattInf() {
        super();
    }
@@ -552,6 +553,13 @@
    public void setInstall_user(String install_user) {
        this.install_user = install_user;
    }
    public String getVideoOrImage() {
        return VideoOrImage;
    }
    public void setVideoOrImage(String videoOrImage) {
        VideoOrImage = videoOrImage;
    }
    @Override
    public String toString() {
        return "BattInf [num=" + num + ", StationId=" + StationId