I'm using the Media module to upload a file in Orchard. If I select a file of 2.2MB it works, however if I try to upload a bigger file (let's say a 4MB movie) I get an error page saying that 'This page is not available'.
Is there a size limit and if yes how can I increase it?
Thanks!
You can set that in root Orchard Web.config file (it's in the Orchard.Web project if you are working with the full source). By default ASP.NET has a 4MB limit for size of POST request.
<system.web>
<httpRuntime maxRequestLength="1024000" executionTimeout="360"/>
</system.web>
Above will set max request size to 1 GB. You can read more about that here, here and here.
An additional note to Piotr's answer: maxRequestLength
's value is in KBs, so maxRequestLength
should be 1024000 for a GB (the answer above shows 102MB).
For those using Azure and the ClickToBuildAzurePackage.cmd
from the source: You'll need to modify the src\Orchard.Azure\Orchard.Azure.Web\Web.config
file with maxRequestLength
. This is because the packager will overwrite the Web.config
in the src/Orchard.Web/Web.config
with this file. Or technically you can make the build and modify the web.config
file after and repackage, but I personally haven't gotten Azure to successfully take my "rezipped" package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With