Skip to content

Commit

Permalink
Make extension check case insensitive (bleenco#229)
Browse files Browse the repository at this point in the history
Sometimes files are being save as picture.JPG instead of picture.jpg
  • Loading branch information
fo authored and jkuri committed Mar 7, 2017
1 parent 6683db2 commit 6296ee0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-uploader",
"description": "Angular File Uploader",
"version": "2.2.1",
"version": "2.2.2",
"license": "MIT",
"main": "bundle/ngx-uploader.umd.js",
"module": "ngx-uploader.js",
Expand Down
2 changes: 1 addition & 1 deletion src/directives/ng-file-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class NgFileSelectDirective implements OnChanges {
if (this.options.filterExtensions && this.options.allowedExtensions && this.files && this.files.length) {
this.files = [].filter.call(this.files, (f: File) => {
let allowedExtensions = this.options.allowedExtensions || [];
if (allowedExtensions.indexOf(f.type) !== -1) {
if (allowedExtensions.toLowerCase().indexOf(f.type.toLowerCase()) !== -1) {
return true;
}

Expand Down

0 comments on commit 6296ee0

Please sign in to comment.