Upload Media Error: Timed out, or max file size exceeded

  • Updated

Frequently, users may run into errors uploading media files larger than the maximum allowed size based on the configuration defaults. You can change these settings to avoid these errors by allowing uploads of a larger size.

The concepts in the configuration are based on the following resources:

This article demonstrates the changes to the web.config needed to increase the default size and request options for media uploads. The following example configuration will allow uploads up to 100MB in size. The attached configs.zip file also includes a settings file supporting up to 500MB, which is needed for Alloy starter site configuration.

Cloudflare CDN imposes an upper limit of 500MB on file uploads, so setting the upload limit higher than this will simply result in users encountering a Cloudflare error instead.


<!-- ASP.NET settings, specifies the limit for the input stream buffering threshold in kB -->
<httpRuntime maxRequestLength="1048576" requestValidationMode="2.0" />
<!-- IIS settings, specifies the maximum length of content in a request in bytes, default value is 30000000 -->
<requestLimits maxAllowedContentLength="1073741824" />

<location path="EPiServer">
<!-- Override settings in edit and admin mode -->
<httpRuntime maxRequestLength="1048576" requestValidationMode="2.0" executionTimeout="7200" />
See the attached zip file (configs.zip) for an example setting the limit to 500MB.