diff --git a/Admin.NET/Admin.NET.Application/Configuration/Upload.json b/Admin.NET/Admin.NET.Application/Configuration/Upload.json index c3ca128b..218d418e 100644 --- a/Admin.NET/Admin.NET.Application/Configuration/Upload.json +++ b/Admin.NET/Admin.NET.Application/Configuration/Upload.json @@ -4,7 +4,7 @@ "Upload": { "Path": "Upload/{yyyy}/{MM}/{dd}", // 文件上传目录 "MaxSize": 51200, // 文件最大限制KB:1024*50 - "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "video/mp4", "application/wps-office.docx", "application/wps-office.xlsx", "application/wps-office.pptx" ], + "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "video/mp4", "application/wps-office.docx", "application/wps-office.xlsx", "application/wps-office.pptx" ], "EnableMd5": false // 启用文件MDF5验证-防止重复上传 }, "OSSProvider": { diff --git a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs index 8ed4dcdd..127b5a8f 100644 --- a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs +++ b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs @@ -323,8 +323,8 @@ public class SysFileService : IDynamicApiController, ITransient var suffix = Path.GetExtension(file.FileName).ToLower(); // 后缀 if (!string.IsNullOrWhiteSpace(suffix)) { - var contentTypeProvider = FS.GetFileExtensionContentTypeProvider(); - suffix = contentTypeProvider.Mappings.FirstOrDefault(u => u.Value == file.ContentType).Key; + //var contentTypeProvider = FS.GetFileExtensionContentTypeProvider(); + //suffix = contentTypeProvider.Mappings.FirstOrDefault(u => u.Value == file.ContentType).Key; // 修改 image/jpeg 类型返回的 .jpeg、jpe 后缀 if (suffix == ".jpeg" || suffix == ".jpe") suffix = ".jpg"; diff --git a/Web/src/layout/logo/index.vue b/Web/src/layout/logo/index.vue index 3688ca8b..3dacd147 100644 --- a/Web/src/layout/logo/index.vue +++ b/Web/src/layout/logo/index.vue @@ -60,6 +60,7 @@ const onThemeConfigChange = () => { &-medium-img { width: 15%; margin-right: 5px; + padding: 3px; } } .layout-logo-size {