Skip to content

Commit dc69da7

Browse files
Merge pull request victorjonsson#650 from nholden/fix-mime-type-validation
Fix issue with hyphens in file validation mime types
2 parents 43369d5 + 0bdf3e3 commit dc69da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* @return {Array}
2626
*/
2727
_getTypes = function($input) {
28-
var allowedTypes = $.split( ($input.valAttr('allowing') || '').toLowerCase() );
28+
var allowedTypes = ($input.valAttr('allowing') || '').toLowerCase().split(/,\s*/);
2929
if ($.inArray('jpg', allowedTypes) > -1 && $.inArray('jpeg', allowedTypes) === -1) {
3030
allowedTypes.push('jpeg');
3131
}

0 commit comments

Comments
 (0)