[ADF-1097] Don't upload file if extension is not acceptable (#2143)

* FileModel's extension getter

* Filter out not supported extension from upload
This commit is contained in:
Popovics András
2017-07-27 14:32:37 +01:00
committed by Eugenio Romano
parent 1673b57a28
commit cb4bc04312
4 changed files with 147 additions and 6 deletions

View File

@@ -73,4 +73,8 @@ export class FileModel {
return v.toString(16);
});
}
get extension(): string {
return this.name.slice((Math.max(0, this.name.lastIndexOf('.')) || Infinity) + 1);
}
}