Getting a MIME type from a file extension in ASP.NET 4.5
Getting a MIME type from a file extension in ASP.NET 4.5
if you are worked with MIME type file upload and download in ASP.NET,you have come across the situation of providing the mime type from file extension.In general to provide mime type file extension we might have to maintain dictionary of mime type or need to write switch case of to accomplish this.
In asp .net 4.5 we have very good feature to provide MIME type of file extension by using the
System.Web.MimeMapping.In the api we need to use single line of call GetMimeMapping(string fileName)
Hope this will helps you.
Labels:
ASP.NET