JavaScript Snippet – Get File Extension from File Picker
When a user selects a file, you may need to know what type of file the user selected to decide how to handle the file. In JavaScript, you listen to the change event on the file input. You get the file name and call .split(‘.’) on it. This creates a new array using “.” as […]