Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    Jun 16, 2023 @ 20:51
    J
    0

    Still cant increase the upload file size??

    Hi

    Im running Umbraco 10 and when i upload a large file to the Media area, i always get a 413 error. I tried adding the below to my appsettings.json

    "Umbraco": {
      "CMS": {
        "Runtime": {
          "MaxQueryStringLength": 90,
          "MaxRequestLength": 2000000
        }
      }
    }
    

    from https://docs.umbraco.com/umbraco-cms/reference/configuration/maximumuploadsizesettings

    but this doesnt do the trick? What am i missing?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 17, 2023 @ 05:44
    Huw Reddick
    0

    Are you hosting site in IIS? if yes then you may need to set max sizes in web.config

  • J 447 posts 864 karma points
    Jun 17, 2023 @ 06:08
    J
    0

    Hi Huw

    I will be hosting it in IIS but at present its on my local machine.

    Also how is web.config related to this scenario as i only have appsettings.json?

    If a config files is still required, where would that need to be placed? What should it contain (max size for a file upload would be 500MB for example)? Do i still need the appsettings.json file?

    but i dont see the relevance of having another config file?

    Not saying you are incorrect but more that why on a new platform i still need an old config file?

    Thanks

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 17, 2023 @ 06:25
    Huw Reddick
    1

    The web.config is used by iis, appsettings.json is not, that is part of your application. When running locally if it is using iisexpress then you will need to increase the limit in web.config too.

    Some info here https://stackoverflow.com/questions/38698350/increase-upload-file-size-in-asp-net-core

  • J 447 posts 864 karma points
    Jun 17, 2023 @ 06:44
    J
    0

    On the server under the site's root directory, create a new config file and have the following content?

      <system.web>
        <!-- Measured in kilobytes -->
        <httpRuntime maxRequestLength="1048576" />
      </system.web>
    

    As for local only the changes in the appsettings would be enough? Or if they dont work then to add a web.config to the root with the content above and that would resolve? Is that correct?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 17, 2023 @ 07:09
    Huw Reddick
    100

    Yes add web.config to the root folder of app, not wwwroot.

Please Sign in or register to post replies

Write your reply to:

Draft