WikiCrawler/Utility/MimeUtility.cs
/// <summary>
/// Returns the MIME type that corresponds to the specified file extension.
/// </summary>
Returns the MIME type that corresponds to the specified file extension.
Returns the MIME type that corresponds to the specified file extension .
public static string GetMimeFromExtension(string ext)
	{
		switch (ext.ToLowerInvariant())
		{
            case ".gif": return "image/gif";
            case ".jpg": return "image/jpeg";
			case ".jpeg": return "image/jpeg";
			case ".png": return "image/png";
            case ".bmp": return "image/bmp";
			case ".tif": return "image/tiff";
			case ".pdf": return "application/pdf";
			default:
				throw new NotImplementedException("No mime for extension '" + ext + "'.");
		}
	}
public static string GetMimeFromExtension ( string ext ) { switch ( ext . ToLowerInvariant ( ) ) { case " " : return " " ; case " " : return " " ; case " " : return " " ; case " " : return " " ; case " " : return " " ; case " " : return " " ; case " " : return " " ; default : throw new NotImplementedException ( " " + ext + " " ) ; } }
Returns the MIME type that corresponds to the specified file extension.
Returns the MIME type that corresponds to the specified file extension .
ext
string