Browse Source

处理文件类型

zhaoxiaohai 3 years ago
parent
commit
a1a7918c5e
1 changed files with 1 additions and 2 deletions
  1. 1 2
      utils/matchingFeilType.js

+ 1 - 2
utils/matchingFeilType.js

@@ -12,11 +12,10 @@ function fileList(list) {
         },
         typeList = [];
     for (let key in suffixList) typeList.push(key);
-
     for (let i = 0; i < list.length; i++) {
         list[i].fileType = 'unknown';
         list[i].cover = `/static/image/file/unknown.png`
-        const suffix = list[i].postfix;
+        const suffix = list[i].postfix.toLowerCase();
         if (suffix != "folder") {
             for (var key in suffixList) {
                 if (suffixList[key].some(value => value == suffix)) {