From 199861856b4688cd470a3f257e334bf835a80118 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 10 十二月 2024 18:22:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/common/PublicCloudController.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/common/PublicCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/common/PublicCloudController.java
index c0b2a04..22227be 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/common/PublicCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/common/PublicCloudController.java
@@ -177,7 +177,10 @@
MultipartFile file = multipartRequest.getFile(it.next());
String originname = file.getOriginalFilename();
is = file.getInputStream();
- String endType = originname.substring(originname.lastIndexOf("."),originname.length());
+ String endType = ".jpg";
+ if(originname.indexOf(".")>0){
+ endType=originname.substring(originname.lastIndexOf("."),originname.length());
+ }
String date = DateUtil.getNowShortDate();
String fName = date+"/"+ UUID.randomUUID()+endType;
String fileName = folder+"/"+fName;
--
Gitblit v1.9.3