Created
December 31, 2016 18:10
-
-
Save hclewk/4ecc20d7b35d57d54e5df19041e556f3 to your computer and use it in GitHub Desktop.
Get Filename from URL in JS
This file contains 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
var getFileName = function (url) { | |
return url.replace(/\?.*$/, "").replace(/.*\//, ""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment