문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top