I am using the FileReader() API to read files on the browser, I want to render something on the screen conditionally based on the file the user uploads:
- JSON.
- CSV.
- Excel.
How can I detect if the file uploaded is an excel file? Do you use libraries for that or is there a genius way we can detect that blindly without going through all the chances?