Home > Net >  aspnet core 6 REST API Large File Upload getting Status 413 Request Entity Too Large
aspnet core 6 REST API Large File Upload getting Status 413 Request Entity Too Large

Time:01-10

I'm trying to upload file file with file size around 134MB via Postman. I'm getting Status: 413 Request Entity Too Large. I've added FormOptions attributes at Startup class too.

Could anyone advise how to solve that issue?

upload-file postman-upload-file-call FormOptions-config

CodePudding user response:

Looks like in your case [DisableRequestSizeLimit] is conflicting with [RequestSizeLimit(500*1024*1024)].

Just these options do the trick:

enter image description here

enter image description here

I didn't use the authorize attribute as mine was only a test app.

  • Related