Please help me to work on WebAPI - Need to accept huge data up-to 5MB as input and save (GET). how to enable this feature in API.
Environment: Microsoft.Net, C#
By default, the max size of the file is about 4MB (4096 KB)
, so you need to change the default value size by custom size. You need to change the value of httpRuntime maxRequestLength
in your web.config
file. following code for setting 2GB
.
<system.web>
<httpRuntime maxRequestLength="2097152" />
</system.web>
Read more about it here: Dealing with large files in ASP.NET