开发者

FileUpload asp.net content type for zip is null

开发者 https://www.devze.com 2023-02-06 15:32 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消