Pre Merge pull request !147 from runphp/N/A

This commit is contained in:
runphp 2022-02-12 06:03:39 +00:00 committed by Gitee
commit ce0a73105f
1 changed files with 1 additions and 4 deletions

View File

@ -86,10 +86,7 @@ public class FileUploadUtils
*/ */
public static final String extractFilename(MultipartFile file) public static final String extractFilename(MultipartFile file)
{ {
String fileName = file.getOriginalFilename(); return DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + getExtension(file);
String extension = getExtension(file);
fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
return fileName;
} }
private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException