文档库--上传文件格式限制
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
fileType = orgName.substring(orgName.lastIndexOf("."));
|
||||
//判断文件类型
|
||||
if (StringUtils.isNotEmpty(fileType)) {
|
||||
String[] fileTypeArr = {".doc", ".docx", ".xls", ".xlsx", ".pdf", ".png", ".jfif", ".pjpeg", ".jpeg", ".pjp", ".jpg", ".swf", ".bmp",".rar",".zip"};
|
||||
String[] fileTypeArr = {".doc",".DOC","txt","TXT", ".docx",".DOCX", ".xls", ".XLS",".xlsx",".XLSX", ".pdf",".PDF", ".png",".PNG", ".jfif",".JFIF", ".pjpeg",".PJPEG", ".jpeg",".JPEG", ".pjp",".PJP", ".jpg",".JPG", ".swf",".SWF", ".bmp",".BMP",".rar",".RAR",".zip",".ZIP"};
|
||||
boolean flag = true;
|
||||
for (String fileTypeTemp : fileTypeArr) {
|
||||
if (fileTypeTemp.equalsIgnoreCase(fileType)) {
|
||||
|
||||
Reference in New Issue
Block a user