jQuery Get the filename from a file input field
The filepath is stored in the field value but, depending on your browser and OS, it can contain confusing pathnames for the user, such as "fakepath". You can strip the filename from the end by splitting the string, making sure to account for forward and backslash.
Snippet Viewed 6720 times.
Share your jQuery code snippets:
- Get some recognition & link back to your site.