I am uploading a file to server using normal upload API's available. Now i want to check whether uploaded file is valid file.
I can have multiple file upload box on page. Which have different requirements and should accept different type of files.
For say :-
Input file 1 should take just exe
Input file 2 should take just html
Input file 3 should take just pptx
i can check extension and check is one solution but it may happen some one may fake the extension and upload txt
file instead of exe
and so
So how can i check whether correct type of file has been uploaded or not using java
Got some Solution for the same stuff but am unsure how to do it? Any help pls