Skip to content

Commit 3688288

Browse files
committed
should the filetype resolve as undefined, try to validate against the file extension of the selected file
1 parent 7fff2eb commit 3688288

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
@@ -87,7 +87,7 @@
8787
if( files.length ) {
8888
$.each(files, function(i, file) {
8989
valid = false;
90-
mime = file.type || '';
90+
mime = file.type || file.name.substring(file.name.lastIndexOf('.') + 1);
9191
$.each(allowedTypes, function(j, type) {
9292
valid = mime.indexOf(type) > -1;
9393
if( valid ) {

0 commit comments

Comments
 (0)