20251024 附件预览
This commit is contained in:
@@ -454,5 +454,37 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件类型是否支持的预览
|
||||
/// </summary>
|
||||
/// <param name="FiletExtension"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsSupportFileType(string FiletExtension)
|
||||
{
|
||||
bool result = false;
|
||||
List<String> list = new List<string>();
|
||||
list.Add("doc");
|
||||
list.Add("docx");
|
||||
list.Add("pdf");
|
||||
list.Add("txt");
|
||||
list.Add("xlsx");
|
||||
list.Add("xls");
|
||||
list.Add("jpg");
|
||||
list.Add("png");
|
||||
list.Add("gif");
|
||||
list.Add("jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user