public static string GetMimeType(string filepath) { var ext = Path.GetExtension(filepath).ToLower().Substring(1); return MimeTypes[ext]; }