Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top