I have a file uploader module. The UI is created using simple HTML and Javascript.
Server side I am using Java code. I want to check the type of the uploaded file.
I have a file uploader module. The UI is created using simple HTML and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Files don’t really have types. The best you can do would be to attempt to load the file as an XLS.
You can also look at the uploaded file name or the content type, but neither of these is definitive; i.e. they might say that the file is an XLS when it is something completely different.