新增获取不带后缀文件名称方法

duhanyu
RuoYi 3 years ago
parent 0c820b96d8
commit 910fe6261b

@ -257,8 +257,8 @@ public class FileUtils
}
/**
*
* : /profile/upload/2022/04/16/ruoyi.png, : ruoyi.png
* /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png
*
* @param fileName
* @return
*/
@ -275,13 +275,15 @@ public class FileUtils
}
/**
*
* : /profile/upload/2022/04/16/ruoyi.png, : ruoyi
* /profile/upload/2022/04/16/ruoyi.png -- ruoyi
*
* @param fileName
* @return
* @return
*/
public static String getNameNotSuffix(String fileName) {
if (fileName == null) {
public static String getNameNotSuffix(String fileName)
{
if (fileName == null)
{
return null;
}
String baseName = FilenameUtils.getBaseName(fileName);

Loading…
Cancel
Save