From 1172bde3b4613ac039b13e19d30ded5b92e3d65f Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期五, 27 十二月 2024 11:26:30 +0800
Subject: [PATCH] parse JWT

---
 pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 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 5e85b07..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
@@ -13,7 +13,8 @@
 import java.io.InputStream;
 
 /**
- * web鏂囦欢涓婁紶
+ * web鏂囦欢涓婁紶, 鍐呴儴璋冪敤锛屽嵆鐢卞叾浠栧瓙妯″潡璋冪敤锛�
+ * 涓�鑸笉鐢卞墠绔郴缁熻皟鐢�
  */
 @Slf4j
 @RestController
@@ -70,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