We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a799f1 commit b0a5ffdCopy full SHA for b0a5ffd
lib/fileinfo.js
@@ -16,7 +16,7 @@ module.exports = function (options) {
16
this.error = 'File is too small';
17
} else if (options.maxFileSize && options.maxFileSize < this.size) {
18
this.error = 'File is too big';
19
- } else if (!options.acceptFileTypes.test(this.name)) {
+ } else if (_.indexOf(options.acceptFileTypes, this.type === -1) {
20
this.error = 'Filetype not allowed';
21
}
22
return !this.error;
@@ -39,4 +39,4 @@ module.exports = function (options) {
39
40
41
return FileInfo;
42
-};
+};
0 commit comments