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