Browse Source

Merge pull request #3441 in VISUAL/fineui from DEC/fineui:release/11.0 to master

* commit 'afcff1d68323905ef1e1b84b464a34d942a2adb4':
  BI-121538 fix(bi.file): 严格文件类型校验
research/test
Aeolus.Zhang-张敬峥 1 year ago
parent
commit
37ccc6b1b2
  1. 4
      src/base/single/input/file.js

4
src/base/single/input/file.js

@ -437,11 +437,11 @@
var matches;
matches = mime.match(r1);
if (matches) {
return fileName.toLowerCase().indexOf(matches[1]) > -1;
return fileName.toLowerCase().endsWith(matches[0]);
}
matches = mime.match(r2);
if (matches) {
return matches[1] === "*" ? true : fileName.toLowerCase().indexOf(matches[1]) > -1;
return matches[1] === "*" ? true : fileName.toLowerCase().endsWith(`.${matches[1]}`);
}
});
}

Loading…
Cancel
Save