diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/api/api/Controllers/FileController.cs | 1 | ||||
-rw-r--r-- | backend/api/api/Program.cs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/backend/api/api/Controllers/FileController.cs b/backend/api/api/Controllers/FileController.cs index ad788e17..7ed16669 100644 --- a/backend/api/api/Controllers/FileController.cs +++ b/backend/api/api/Controllers/FileController.cs @@ -130,6 +130,7 @@ namespace api.Controllers [HttpPost("Csv")] [Authorize(Roles = "User,Guest")] + [DisableRequestSizeLimit] public async Task<ActionResult<string>> CsvUpload([FromForm]IFormFile file) { diff --git a/backend/api/api/Program.cs b/backend/api/api/Program.cs index 7d5d0c45..43fd5cd6 100644 --- a/backend/api/api/Program.cs +++ b/backend/api/api/Program.cs @@ -4,6 +4,7 @@ using api.Interfaces; using api.Models; using api.Services; using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; using MongoDB.Driver; @@ -55,6 +56,11 @@ builder.Services.AddAuthentication( }; }); +builder.Services.Configure<FormOptions>(x => +{ + x.ValueLengthLimit = int.MaxValue; + x.MultipartBodyLengthLimit = int.MaxValue; +}); builder.Services.AddControllers(); |