From 2610869e9ca911641b182870601402fab529175c Mon Sep 17 00:00:00 2001 From: runphp Date: Fri, 11 Feb 2022 07:18:44 +0000 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E9=87=8Ffilename=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E5=90=8E=E6=9C=AA=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/file/utils/FileUploadUtils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java index 02eb1cd29..d8d96862a 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java @@ -86,10 +86,7 @@ public class FileUploadUtils */ public static final String extractFilename(MultipartFile file) { - String fileName = file.getOriginalFilename(); - String extension = getExtension(file); - fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension; - return fileName; + return DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + getExtension(file); } private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException