From f88c07d7941a0c18bb097f20618c18b9d2418ccc Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期三, 11 九月 2024 15:42:51 +0800
Subject: [PATCH] next node
---
pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
index c41d614..50d62d5 100644
--- a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
+++ b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
@@ -71,7 +71,12 @@
}else{
zipFileInput = ZipImg.zipToJpg(fPic, photoZipWidth, photoZipWidth) ;
}
- boolean zipOk = new FileUtil().saveFile(zipFilePath, zipFileInput) ;
+ if(zipFileInput.available() > 0){
+ new FileUtil().saveFile(zipFilePath, zipFileInput) ;
+ }else{
+ //濡傛灉鍘嬬缉鏂囦欢涓嶅瓨鍦ㄦ垨鐢熸垚澶辫触锛屽垯澶嶅埗婧愭枃浠�
+ new FileUtil().saveFile(zipFilePath, file.getInputStream()) ;
+ }
}
}
}
--
Gitblit v1.8.0