From 36882884cacf54db0b10d82d5ab629d3ca5760f0 Mon Sep 17 00:00:00 2001 From: Johannes Neumeier Date: Fri, 28 Oct 2016 15:23:51 +0300 Subject: [PATCH] should the filetype resolve as undefined, try to validate against the file extension of the selected file --- src/modules/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/file.js b/src/modules/file.js index 8306a83..e120dde 100644 --- a/src/modules/file.js +++ b/src/modules/file.js @@ -87,7 +87,7 @@ if( files.length ) { $.each(files, function(i, file) { valid = false; - mime = file.type || ''; + mime = file.type || file.name.substring(file.name.lastIndexOf('.') + 1); $.each(allowedTypes, function(j, type) { valid = mime.indexOf(type) > -1; if( valid ) {