Checking contents of Uploaded file

Posted by kapil on Stack Overflow See other posts from Stack Overflow or by kapil
Published on 2010-04-22T06:47:23Z Indexed on 2010/04/22 6:53 UTC
Read the original article Hit count: 257

Filed under:
|

Hi all, I am using ASP.NEt MVC . I want to upload .zip files for which I am using html input file upload control on my view. I want only .zip files to be uploaded. I want to check that my .zip contains only two files - both having extensions .txt and one of them having name "start". Can anyone please suggest me about how to check this? How can we assure that the uploaded .zip is really a zipped folder and not any other file having just .zip extension. can we use HttpPostedFileBase.ContentType?

thanks in advance, kaps

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about fileupload