上传文件生成名称规则修改

This commit is contained in:
dingjie 2023-12-23 19:33:37 +08:00
parent a47c83e0aa
commit b6bd220662
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ public class SysFileServiceImpl implements SysFileService {
String url = ""; String url = "";
String tmpName = multipartFile.getOriginalFilename();// 完整路径 IE String tmpName = multipartFile.getOriginalFilename();// 完整路径 IE
tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1); tmpName = tmpName.substring(tmpName.lastIndexOf("\\") + 1);
tmpName = IdUtil.fastSimpleUUID() + tmpName; tmpName = IdUtil.fastSimpleUUID() + System.currentTimeMillis() +tmpName.substring(tmpName.lastIndexOf("."),tmpName.length());
String imageFiles="/data/sgzb/" + fileType + "/"; String imageFiles="/data/sgzb/" + fileType + "/";
String os = System.getProperty("os.name"); String os = System.getProperty("os.name");
if(os.toLowerCase().startsWith("win")){ if(os.toLowerCase().startsWith("win")){