Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1288 posts 3921 karma points c-trib
    Dec 21, 2009 @ 11:04
    Dan
    2

    Media file size limit

    Hi all,

    Does anyone know how to change the media upload file size limit?  I can't see a setting in web.config which is where I would have thought it would be.

    Thank you!

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 21, 2009 @ 11:08
    Dirk De Grave
    10

    Hi Dan,

    It's in the web.config

    <system.web>
      <httpRuntime  maxRequestLength="102400" executionTimeout="360"/>
    </system.web>

    maxRequestLength - Attribute limits the file upload size for ASP.NET application. This limit can be used to prevent denial of service attacks (DOS) caused by users posting large files to the server. The size specified is in kilobytes. As mentioned earlier, the default is "4096" (4 MB). Max value is "1048576" (1 GB) for .NET Framework 1.0/1.1 and "2097151" (2 GB) for .NET Framework 2.0.

    executionTimeout - Attribute indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by the application. The executionTimeout value should always be longer than the amount of time that the upload process can take.

     

    Cheers,

    /Dirk

  • Dan 1288 posts 3921 karma points c-trib
    Dec 21, 2009 @ 11:12
    Dan
    0

    A-ha!  My application must be running on defaults as there are no settings like that in web.config so I'll create them.  Thanks Dirk, much appreciated.

  • Petr Snobelt 923 posts 1535 karma points
    Apr 05, 2011 @ 23:07
    Petr Snobelt
    8

    When anyone need this, I add this code to web.config. It extend timeout for long actions (like copy etc) and allow big files upload, and limit this settings to backend only. (I primary note this here to myself :-)

    <!-- Increase umbraco action timeouts, 
         prevent timeout on long running actions, like copy, creating new property etc -->
      <location path="umbraco">
        <system.web>
          <httpRuntime maxRequestLength="204800" executionTimeout="99999"/>
        </system.web>
      </location>
    

    Petr

  • Greg Mattison 40 posts 60 karma points
    Sep 04, 2012 @ 23:45
    Greg Mattison
    0

    This worked perfectly. I copied and pasted the syntax above near the bottom of the web.config and can now upload larger file sizes. Thanks!

  • Skowronek 29 posts 105 karma points
    Aug 01, 2013 @ 07:34
    Skowronek
    10

    When working with IIS 7+, also requires adding requestFiltering under the system.webServer section:

    <system.web>
        <httpRuntime maxRequestLength="204800" executionTimeout="99999" />
    </system.web>
    <system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="204800000"/>
            </requestFiltering>
        </security>
    </system.webServer>
    
  • Suraj 1 post 20 karma points
    Feb 09, 2017 @ 16:59
    Suraj
    0

    awesome. worked perfectly. thanks

  • Chaitanya Gadkari 27 posts 66 karma points
    Jul 10, 2015 @ 09:27
    Chaitanya Gadkari
    0

    Dirk De Grave's solution works fine.

    But Umbraco should show some message if the limit is exceeded. Images just disappear and there is no message as of now.

  • LeszekP 27 posts 78 karma points
    Jul 27, 2015 @ 11:40
    LeszekP
    0

    As @Chaitanywa said. Why there is no error message?

  • Matt Kemp 9 posts 64 karma points
    Feb 04, 2016 @ 21:07
    Matt Kemp
    0

    There is an error message (red bar appears temporarily at the bottom of the page) if you try to upload a file to the Media area, but if you upload via a Media Picker property there is no error message (not on 7.3.1 anyway)

  • Duy Nguyen 1 post 71 karma points
    Jun 20, 2016 @ 04:28
    Duy Nguyen
    0

    Hi all,

    Umbraco not show message when media upload is exceeded size limit. Please help to resolve it. I'm using Umbraco 7.2.8

  • Matt Smith 79 posts 110 karma points
    Jul 04, 2016 @ 15:25
    Matt Smith
    0

    Hi, We are looking at this, can anyone confirm if this only affects the limit of files uploaded through umbraco into the media area? or will it also affect content imported in other ways? Thanks, Matt

  • Matt Smith 79 posts 110 karma points
    Aug 05, 2016 @ 13:33
    Matt Smith
    0

    Hi, just bumping this one - we want to set a file size limit for our media area - can anyone confirm that this setting will only affect that and not other data that we import into umbraco using APIs etc, Thanks, Matt

  • Damien (Slipoch) 62 posts 346 karma points
    Feb 05, 2018 @ 22:25
    Damien (Slipoch)
    0

    Hi Matt, This will allow the server to upload larger files and wait longer to upload them.

    Maybe use JS, HTML 5 and a controller to double-check file sizes if uploading via form or API

Please Sign in or register to post replies

Write your reply to:

Draft