Created
June 29, 2014 08:34
-
-
Save felixzapata/d2554b5a7cb695f0dfd9 to your computer and use it in GitHub Desktop.
Extensión de un fichero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/8231058/file-type-validation-with-javascript | |
return fname.substr((Math.max(0, fname.lastIndexOf(".")) || Infinity) + 1); | |
return fname.substr((~-fname.lastIndexOf(".") >>> 0) + 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment