feat(SystemSetting): 增加图片扩展名配置项并优化图片判断逻辑
- 在 appsettings.json 中添加 ImageExtensions 配置项,用于指定允许的图片扩展名 - 在 SystemSetting 模型中添加 ImageExtensions 属性 - 优化 Utils.cs 中的 IsImageFile 方法,支持从配置中读取图片扩展名列表 - 新增 TODO 列表,包含项目优化建议和改进任务
This commit is contained in:
@@ -23,6 +23,10 @@ namespace COMCMS.Web.Models
|
||||
/// </summary>
|
||||
public string MediaAllowedExtensions { get; set; }
|
||||
/// <summary>
|
||||
/// 图片文件扩展名(用于判断是否为图片)
|
||||
/// </summary>
|
||||
public string ImageExtensions { get; set; }
|
||||
/// <summary>
|
||||
/// JWT验证的密钥
|
||||
/// </summary>
|
||||
public string JwtSecret { get; set; }
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"FileAllowedExtensions": "zip,rar,7z,doc,docx,xls,xlsx,ppt,pptx,csv,pdf,txt,gz,gzip,gif,png,jpg,jpeg,bmp,avi,fla,flv,swf,mp4,mp3,mov,mid,mpg,mpeg,rm,rmvb,wma,wav,wmv",
|
||||
"ImageAllowedExtensions": "gif,png,jpg,jpeg,bmp",
|
||||
"MediaAllowedExtensions": "flv,mp4,mp3,wmv,swf,mov",
|
||||
"ImageExtensions": "jpg,jpeg,png,bmp,gif",
|
||||
"COMCMSPrefixKey": "abc_",
|
||||
"SignSalt": "comcms",
|
||||
"JwtSecret": "comcms0b311362786dabe03af7b484ed032b91698a4eb9377687bd031d837082",
|
||||
|
||||
Reference in New Issue
Block a user