Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3630

File upload works from Swagger, but fails in REST API client , says 413 Request Entity Too Large

$
0
0

My .net core rest api with IIS server setup is able to upload files through the Swagger UI, but it fails when I try to upload from REST API client (Postman or Insomnia) saying "413 Request Entity Too Large".

I am able to upload large files through Swagger, but all files even less than 100 kb fail to upload through REST clients.

My curl from Swagger UI after file upload as follows:

curl -X 'POST''https://example.com/api/FileUpload/UploadFile' \     -H 'accept: */*' \     -H 'Content-Type: multipart/form-data' \     -F 'file=@FiletoUpload.pdf;type=application/pdf'

Viewing all articles
Browse latest Browse all 3630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>