type check while uploading

Posted on 16th Feb 2014 by admin

Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here is the scenario:
I have allowed only .jpg, .gif, .png files to be uploaded on my site. Suppose an user renames his .exe file with .jpg file. In this case, how can I prevent it to be uploaded on the server?

Please suggest..

Other forums