liurunyu
2024-08-15 7a4b66b5fa1e0000e6d54cbfc27f561abf08947f
pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
@@ -71,11 +71,11 @@
                        }else{
                            zipFileInput = ZipImg.zipToJpg(fPic, photoZipWidth, photoZipWidth) ;
                        }
                        boolean zipOk = new FileUtil().saveFile(zipFilePath, zipFileInput) ;
                        //如果压缩文件不存在或生成失败,则复制源文件
                        File zipFile = new File(zipFilePath);
                        if (!zipFile.exists() || zipFile.length()==0) {
                            zipOk = new FileUtil().saveFile(zipFilePath, file.getInputStream()) ;
                        if(zipFileInput.available() > 0){
                            new FileUtil().saveFile(zipFilePath, zipFileInput) ;
                        }else{
                            //如果压缩文件不存在或生成失败,则复制源文件
                            new FileUtil().saveFile(zipFilePath, file.getInputStream()) ;
                        }
                    }
                }