Su Ming Yuan
Su Ming Yuan

Reputation: 125

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

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

Upvotes: 0

Views: 2356

Answers (1)

Ceemah Four
Ceemah Four

Reputation: 518

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.

Upvotes: 2

Related Questions