I’m building an application that will allow a user to uload a .csv file through a browser. The application then takes the .csv file and creates documents in the database.
My question is: Is there any way for me to verify that the file is, in fact, a .csv file?
I’m currently working on getting the attachment name, and checking the extension, but I was hoping for a better way to validate the actual file.
That way if someone renames a .xls to a .csv I can detect it. Or if someone uloads a .txt, I can use it.
Thanks,
Vic