|
|
@@ -59,14 +59,11 @@ public final class FileCheckRuleConfig {
|
|
|
*/
|
|
|
public static final FileCheckRuleConfig DOCUMENT = builder()
|
|
|
.withExtensions(
|
|
|
- // ... 原有扩展名
|
|
|
"pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt",
|
|
|
- // 新增WPS扩展名
|
|
|
- "wps", "et", "dps",
|
|
|
- "wpt", "ett", "dpt" // 如果需要,也可以加上模板文件
|
|
|
+ // WPS 文件扩展名
|
|
|
+ "wps", "et", "dps", "wpt", "ett", "dpt", "vsd", "vsdx"
|
|
|
)
|
|
|
.withMimeTypes(
|
|
|
- // ... 原有MIME类型
|
|
|
"application/pdf",
|
|
|
"application/msword",
|
|
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
|
@@ -75,14 +72,17 @@ public final class FileCheckRuleConfig {
|
|
|
"application/vnd.ms-powerpoint",
|
|
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
|
"text/plain",
|
|
|
- // 新增WPS MIME类型
|
|
|
- "application/vnd.ms-works", // 常用于.wps
|
|
|
- "application/wps-office.wps", // 更精确的.wps类型
|
|
|
- "application/wps-office.et", // .et类型
|
|
|
- "application/wps-office.dps", // .dps类型
|
|
|
- "application/wps-office.wpt", // 如果需要模板
|
|
|
- "application/wps-office.ett", // 如果需要模板
|
|
|
- "application/wps-office.dpt" // 如果需要模板
|
|
|
+ // WPS MIME 类型
|
|
|
+ "application/vnd.ms-works",
|
|
|
+ "application/wps-office.wps",
|
|
|
+ "application/wps-office.et",
|
|
|
+ "application/wps-office.dps",
|
|
|
+ "application/wps-office.wpt",
|
|
|
+ "application/wps-office.ett",
|
|
|
+ "application/wps-office.dpt",
|
|
|
+ // 其他可能的 MIME 类型
|
|
|
+ "application/octet-stream", // 某些 WPS 文件可能被识别为此类型
|
|
|
+ "application/x-msdownload"
|
|
|
)
|
|
|
.build();
|
|
|
// /**
|