Question

I'd like to know how to check the real type of an uploaded file. Say if it's a .exe file but the user's changed its extension to .jpg before uploading.

HttpPostedFileBase still recognizes it as .jpg... It's a worrisome to me.

Thanks.

Was it helpful?

Solution

I don't believe you have the privilege to view file contents on the client side due to browser security policy. You are going to have to examine the file on the server once it's been uploaded.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top