[backend/drive] Allow for uploading of files larger than 128MiB if configured
This commit is contained in:
parent
2bf714b8e1
commit
2a209d6de3
1 changed files with 13 additions and 1 deletions
|
@ -1,12 +1,13 @@
|
|||
using Iceshrimp.Backend.Core.Configuration;
|
||||
using Iceshrimp.Backend.Core.Middleware;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Iceshrimp.Backend.Controllers.Shared.Attributes;
|
||||
|
||||
public class MaxRequestSizeIsMaxUploadSize : Attribute, IResourceFilter
|
||||
public class MaxRequestSizeIsMaxUploadSize : Attribute, IFormOptionsMetadata, IResourceFilter
|
||||
{
|
||||
public void OnResourceExecuting(ResourceExecutingContext context)
|
||||
{
|
||||
|
@ -21,4 +22,15 @@ public class MaxRequestSizeIsMaxUploadSize : Attribute, IResourceFilter
|
|||
}
|
||||
|
||||
public void OnResourceExecuted(ResourceExecutedContext context) { }
|
||||
|
||||
public bool? BufferBody => null;
|
||||
public int? MemoryBufferThreshold => null;
|
||||
public long? BufferBodyLengthLimit => long.MaxValue;
|
||||
public int? ValueCountLimit => null;
|
||||
public int? KeyLengthLimit => null;
|
||||
public int? ValueLengthLimit => null;
|
||||
public int? MultipartBoundaryLengthLimit => null;
|
||||
public int? MultipartHeadersCountLimit => null;
|
||||
public int? MultipartHeadersLengthLimit => null;
|
||||
public long? MultipartBodyLengthLimit => long.MaxValue;
|
||||
}
|
Loading…
Add table
Reference in a new issue