tags:

views:

48

answers:

1

how to get the image name and content type in mvc application i am using the input type file control of Html on my page .please help me with useful answers.

Thanks, ritz

A: 

Have a look at http://mikehadlow.blogspot.com/2008/03/file-uploads-with-mvc-framework.html. I presume that you are trying to upload an image in ASP.NET MVC. The linked article should get you most of the way there. The image content type isn't immediately available, but just assume it to be image/jpeg or image/png depending on the extension of the file name.

Darren Oster