From 86bb6f0b802c6596a5fb3ead8548e55309175a45 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 27 May 2022 20:16:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E7=B1=BB=E5=9E=8B=E8=AF=86=E5=88=AB=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E4=BA=8E=20filename=20=E7=9A=84?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/infra/service/file/FileServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index 4f3736f1b..fc3eedbac 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -39,7 +39,7 @@ public class FileServiceImpl implements FileService { @Override public String createFile(String path, byte[] content) throws Exception { // 计算默认的 path 名 - String type = FileTypeUtil.getType(new ByteArrayInputStream(content)); + String type = FileTypeUtil.getType(new ByteArrayInputStream(content), path); if (StrUtil.isEmpty(path)) { path = DigestUtil.md5Hex(content) + '.' + type; }