Browse Source

可预览文件类型判断,忽略大小写

MaiXinRong 3 năm trước cách đây
mục cha
commit
3ef9e6b039
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/extend/helper.js

+ 1 - 1
app/extend/helper.js

@@ -1228,7 +1228,7 @@ module.exports = {
      * @return {Boolean} 匹配结果
      */
     canPreview(ext) {
-        const reg = /(.png)|(.gif)|(.txt)|(.jpg)|(.jpeg)|(.pdf)/;
+        const reg = /(.png)|(.gif)|(.txt)|(.jpg)|(.jpeg)|(.pdf)/i;
         return reg.test(ext);
     },