Skip to content

Commit f16554c

Browse files
Merge pull request victorjonsson#524 from kontur/workaround-filetype-fallback
should the filetype resolve as undefined, try to validate against the…
2 parents 7fff2eb + 3688288 commit f16554c

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)