Open Closed

File Management Module -> Files failing to upload above 28MB #1344


User avatar
0
jtallon created
  • ABP Framework version: v4.2

  • UI type: MVC

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular) : no

  • Issue: How can I increase the Request Size for just the FileManagement Upload Module?

  • Steps to reproduce the issue:

[12:39:03 WRN] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "Your request is not valid!",
"details": "The following errors were detected during validation.\r\n - Failed to read the request form. Request body too large.\r\n",
"data": {},
"validationErrors": [
{
"message": "Failed to read the request form. Request body too large.",
"members": [
""
]
}
]
}


1 Answer(s)
  • User Avatar
    0
    jtallon created

    I have resolved this aready myself.. please set as closed.

    Added some middleware directives to the Startu.cs.

    webBuilder.UseKestrel(options => { options.Limits.MaxRequestBodySize = long.MaxValue; });

    Also in the main web module I added

    services.Configure<FormOptions>(x => { x.ValueLengthLimit = int.MaxValue; x.MultipartBodyLengthLimit = int.MaxValue; // if don't set default value is: 128 MB x.MultipartHeadersLengthLimit = int.MaxValue; });

    All of these are inline with the aspnet core docs, althought we wont be leaving the MaxValues in there.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08