R. Matveev R. Matveev - 3 months ago 6x
Javascript Question

Big files aren't uploading through my js plugin

I made a small (jQuery + ajax + backend) file uploading plugin. When I was testing this plugin I noticed that some files are not being uploaded to my server (they give me an exception). Then, I realised that the problem is in their sizes: smaller ones are going well, but the bigger ones not. Then I made a junk txt file constisting of symbols, in order to count what is the filesize quota. So, files before 4 194 116 b passes, files from 4 194 117 not.

I don't know whether it is a js's problem, or ajax's problem, or maybe even IIS and Visual Studio. What am I supposed to do to check where is the problem or any bandwidth options?

TL;DR: Files bigger than 4194116 bytes are not being uploaded by js.

Update 1: I know about request-size settings in web.config. It is set properly:

<httpRuntime maxRequestLength="153600" executionTimeout="60" /><!--150MB (in kbytes) & 60s timeout-->

<requestLimits maxAllowedContentLength="157286400" /> <!--150MB (in bytes)-->


Found a problem. I just set the limitations in View's Web.config but it should be in main Web.config in the root.