修改上传文件大小

development
温天培 2 years ago
parent b55603fb4c
commit 6d7f3ef7ce

@ -6047,6 +6047,11 @@
文件类型 文件类型
</summary> </summary>
</member> </member>
<member name="P:GDZZ.Core.Service.FileInput.CID">
<summary>
课程ID
</summary>
</member>
<member name="P:GDZZ.Core.Service.DeleteFileInfoInput.Id"> <member name="P:GDZZ.Core.Service.DeleteFileInfoInput.Id">
<summary> <summary>
文件Id 文件Id
@ -6079,6 +6084,13 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:GDZZ.Core.Service.SysFileService.QueryMP4FileInfoList(GDZZ.Core.Service.FileInput)">
<summary>
分页获取MP文件列表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:GDZZ.Core.Service.SysFileService.QueryMP4FileInfoPageList(GDZZ.Core.Service.FileInput)"> <member name="M:GDZZ.Core.Service.SysFileService.QueryMP4FileInfoPageList(GDZZ.Core.Service.FileInput)">
<summary> <summary>
分页获取MP文件列表 分页获取MP文件列表

@ -53,6 +53,11 @@ public class FileInput : PageInputBase
/// 文件类型 /// 文件类型
/// </summary> /// </summary>
public int FileType { get; set; } public int FileType { get; set; }
/// <summary>
/// 课程ID
/// </summary>
public long CID { get; set; }
} }
public class DeleteFileInfoInput public class DeleteFileInfoInput

@ -56,6 +56,31 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
} }
/// <summary>
/// 分页获取MP文件列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/Mini/sysFileInfo/list")]
public async Task<dynamic> QueryMP4FileInfoList([FromQuery] FileInput input)
{
var fileBucket = !string.IsNullOrEmpty(input.FileBucket?.Trim());
var fileOriginName = !string.IsNullOrEmpty(input.FileOriginName?.Trim());
//rmrf-
var files = await _sysFileInfoRep.AsQueryable()
.WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation)
.Where(u => u.FileSuffix == "MP4")
.WhereIF(!input.CID.IsNullOrZero(), u => u.CID == input.CID)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim()))
.Select<FileOutput>()
.ToListAsync();
return files;
}
/// <summary> /// <summary>
/// 分页获取MP文件列表 /// 分页获取MP文件列表
/// </summary> /// </summary>
@ -72,9 +97,9 @@ public class SysFileService : ISysFileService, IDynamicApiController, ITransient
var files = await _sysFileInfoRep.AsQueryable() var files = await _sysFileInfoRep.AsQueryable()
.WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation) .WhereIF(input.FileLocation > 0, u => u.FileLocation == input.FileLocation)
.Where(u=>u.FileSuffix =="MP4") .Where(u=>u.FileSuffix =="MP4")
.WhereIF(input.FileType == 1,u=> u.CID == 0) .WhereIF(input.FileType == 1,u=> u.CID == 0 )
.WhereIF(input.FileType == 2, u => u.CID != 0) .WhereIF(input.FileType == 2, u => u.CID == input.CID )
.WhereIF(!UserManager.IsSuperAdmin, u => u.CreatedUserId == UserManager.UserId) .WhereIF(!UserManager.IsSuperAdmin && input.FileType == 2, u => u.CreatedUserId == UserManager.UserId)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.FileBucket), u => u.FileBucket.Contains(input.FileBucket.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.FileOriginName), u => u.FileOriginName.Contains(input.FileOriginName.Trim()))
.Select<FileOutput>() .Select<FileOutput>()

@ -1,5 +1,5 @@
{ {
"MaxRequestBodySize": 41943040, //byte 1kb=1024byte,40M "MaxRequestBodySize": 104857600, //byte 1kb=1024byte,40M
//"Serilog": { //"Serilog": {
// "MinimumLevel": { // "MinimumLevel": {
// "Default": "Information", // "Default": "Information",

Loading…
Cancel
Save