Large Video Upload gives Error 400 Bad Request
We've configured the application to allow for up to 4 GB files.
This includes:
- Home.razor: RichTextEditorVideoSettings MaxFileSize="4000000000"
- API Controller: [RequestSizeLimit(4_000_000_000)]
- Program.cs: builder.Services.Configure<KestrelServerOptions>(options => { options.Limits.MaxRequestBodySize = 4000000000; });
- web config: maxAllowedContentLength="4000000000"
When testing smaller video (e.g. 35 MB), it works as expected.
With larger videos, it fails during upload with error 400 (Bad Request).
Coincidentally, it seems to always stop around 128 MB:
414.0 failed at 31% - around 128 MB
377.4 failed at 34% - around 128 MB
Please advise on how to resolve this.
Note: In this ticket, I'm trying to upload the test project zip file (only 1.6 MB) and am getting error "File failed to upload". So here's a link to download it: https://tinyurl.com/23rkr7s7
builder.Services.Configure<FormOptions>(options => { options.MultipartBodyLengthLimit = 1000 * 1024 * 1024; // 1000 MB }); |
This worked great. Thanks!
I suggest you add this to your docs:
Brian Pautsch,
You are welcome. We will consider your request to add this information to our documentation.
- 6 Replies
- 2 Participants
- Marked answer
-
BP Brian Pautsch
- Oct 28, 2025 07:05 PM UTC
- Nov 5, 2025 05:58 AM UTC