I'm using the FileUpload control with .net 3.5 (webforms). Before I accept a file I want to check the content type. And this works just as I want to. The problem I have is that when I try to upload a zip file or a rar file the content type is null and the check fails.
When I debug and check my Post开发者_如何学PythonedFile I get the correct ContentLength, FileName and InputStream. But ContentType is null.
Anyone know why I get this problem? All other file types works.
EDIT:
The problem seems to be in chrome only, I get the correct content type in ie and firefox.
精彩评论