fix:文件上传后缀不支持大写问题修复
This commit is contained in:
parent
d49f3f2d70
commit
d4da257eb9
@ -105,7 +105,8 @@ public class OssServiceImpl implements OssService {
|
||||
// 根据用户获取目录名
|
||||
String dir = getUserDirName(user) + DateUtil.format(new Date(), "yyyyMMdd");
|
||||
// 创建唯一文件名称
|
||||
String suffix = fileName.substring(fileName.lastIndexOf("."));
|
||||
assert fileName != null;
|
||||
String suffix = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
|
||||
String uploadName = IdUtil.simpleUUID() + suffix;
|
||||
String uploadPath = FILEPATH + "/" + dir + "/" + uploadName;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user