cara memeriksa ekstensi file dalam javascript
return filename.split('.').pop();
Open Octopus
return filename.split('.').pop();
var fileName = "myDocument.pdf";
var fileExtension = fileName.split('.').pop(); //"pdf"