Procházet zdrojové kódy

处理文件类型

zhaoxiaohai před 3 roky
rodič
revize
a1a7918c5e
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  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)) {