From 199b4feac5b094c6aeda86c6f78b546401f29c18 Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 21 Mar 2017 12:22:02 +0100 Subject: [PATCH] fix: fix check for dropped file extension (#237) --- package.json | 2 +- src/directives/ng-file-drop.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c55bd234..85d6bcbb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ngx-uploader", "description": "Angular File Uploader", - "version": "2.2.4", + "version": "2.2.5", "license": "MIT", "main": "bundle/ngx-uploader.umd.js", "module": "ngx-uploader.js", diff --git a/src/directives/ng-file-drop.ts b/src/directives/ng-file-drop.ts index 37912aed..7d0b8060 100644 --- a/src/directives/ng-file-drop.ts +++ b/src/directives/ng-file-drop.ts @@ -100,7 +100,7 @@ export class NgFileDropDirective implements OnChanges, OnInit { } let ext = f.name.split('.').pop(); - if (ext && allowedExtensions.indexOf(ext) !== -1 ) { + if (ext && allowedExtensions.indexOf(ext.toLowerCase()) !== -1 ) { return true; }