/// <summary> /// 检验文件类型 /// </summary> /// <param name="file"></param> /// <returns></returns> public static bool CheckType(this HttpPostedFileBase file) { string ext = file.GetExtName(); return(ExtFormat.IndexOf(ext.ToLower()) < 0); }