Copied to clipboard

Flag this post as spam?

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


  • Blake Watt (Clerke) 106 posts 351 karma points MVP
    May 05, 2014 @ 22:11
    Blake Watt (Clerke)
    0

    max media file size limit in version 7

    Hi All, I know that in previous version you could modify a line in the web config to change the max file size limit for media items in Umbraco but I've read through this article already and it doesnt seem to apply to 7. Would anyone happen to know how to do this version 7?

    Thank you!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 05, 2014 @ 22:50
    Jan Skovgaard
    2

    Hi Blake

    Well you probably also need to set max file size limitation then.

    Have a look at this article from Jeavon Leopold at the 24days.in/umbraco advent calendar to see where and how to add it.

    Hope this helps! :)

    /Jan

  • Biagio Paruolo 1583 posts 1814 karma points c-trib
    Jul 27, 2015 @ 08:42
    Biagio Paruolo
    0

    Good -:)

  • Amir Khan 1282 posts 2739 karma points
    May 05, 2014 @ 22:52
    Amir Khan
    1

    HI Blake, this didn't work for you? It shouldn't be Umbraco version dependent, as the httpruntime element really an element of .NET.

    -Amir

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" maxRequestLength="204800" executionTimeout="99999" />
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 05, 2014 @ 23:06
    Jan Skovgaard
    1

    @Amir

    Sometimes you need to add this as well

    <!-- Max file size limitation -->
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="157286400" />
      </requestFiltering>
    </security>
    

    As mentioned in the article I refer above :)

    /Jan

  • Amir Khan 1282 posts 2739 karma points
    May 05, 2014 @ 23:09
    Amir Khan
    0

    @Jan, great guide for config tweaks!

    -Amir

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 05, 2014 @ 23:12
    Jan Skovgaard
    0

    Yup, Jeavon did a good job (As always) :-)

    /Jan

  • Blake Watt (Clerke) 106 posts 351 karma points MVP
    May 06, 2014 @ 00:08
    Blake Watt (Clerke)
    1

    Hey guys thank you so much for the quick answers and I'm sorry for the redundant question in the forum. I tried with you suggested and updated my web.config to 

    Web.config:

    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="512000" executionTimeout="99999" />

    I also added this in the system.webServer section:

    <security>

          <requestFiltering>

            <requestLimits maxAllowedContentLength="157286400" />

          </requestFiltering>

        </security>

    but I'm getting this error message when I try to upload a 151MB mp4 file into the media section. Since the drag and drop way wasn't showing up anything I made a file manually and then tried to upload the mp4 file - that is where I got the error message.

    Error Message:

    Request error: The URL returned a 404 (not found): 
    /umbraco/backoffice/UmbracoApi/Media/PostSave
    with data: 
    {"key":"contentItem","value":{"id":1440,"properties":[{"id":5206,"alias":"umbracoFile","value":{"selectedFiles":"LeeValent Group Video.mp4"}},{"id":5207,"alias":"umbracoExtension","value":""},{"id":5208,"alias":"umbracoBytes","value":""}],"name":"LeeValent Group Video","contentTypeAlias":"File","parentId":1072,"action":"save"}}

    Contact your administrator for information. 

     

    I appreciate the help very much. Thank you!!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 06, 2014 @ 09:06
    Jan Skovgaard
    102

    Hi Blake

    Ok, the file is 151 MB...the limits set in the examples from my article allow file sizes of 150 MB.

    So you need to allow for something higher...Like 524288000 - This should give you 512 MB.

    However you probably also need to make sure that the server knows the mime-type of the file you're trying to upload.

    To make sure that you won't have any issie with the most common file types copy/paste the following within the section in the web.config as well - It's from the html5 boilerplate best practices for the web.config here https://github.com/darktable/html5-boilerplate-server-configs/blob/master/web.config

          <!-- use utf-8 encoding for anything served text/plain or text/html -->
          <remove fileExtension=".css" />
          <mimeMap fileExtension=".css" mimeType="text/css" />
          <remove fileExtension=".js" />
          <mimeMap fileExtension=".js" mimeType="text/javascript" />
          <remove fileExtension=".json" />
          <mimeMap fileExtension=".json" mimeType="application/json" />
          <remove fileExtension=".rss" />
          <mimeMap fileExtension=".rss" mimeType="application/rss+xml; charset=UTF-8" />
          <remove fileExtension=".html" />
          <mimeMap fileExtension=".html" mimeType="text/html; charset=UTF-8" />
          <remove fileExtension=".xml" />
          <mimeMap fileExtension=".xml" mimeType="application/xml; charset=UTF-8" />
          <!-- HTML5 Audio/Video mime types-->
          <remove fileExtension=".mp3" />
          <mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
          <remove fileExtension=".mp4" />
          <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
          <remove fileExtension=".ogg" />
          <mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
          <remove fileExtension=".ogv" />
          <mimeMap fileExtension=".ogv" mimeType="video/ogg" />
          <remove fileExtension=".webm" />
          <mimeMap fileExtension=".webm" mimeType="video/webm" />
          <!-- Proper svg serving. Required for svg webfonts on iPad -->
          <remove fileExtension=".svg" />
          <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
          <remove fileExtension=".svgz" />
          <mimeMap fileExtension=".svgz" mimeType="image/svg+xml" />
          <!-- HTML4 Web font mime types -->
          <!-- Remove default IIS mime type for .eot which is application/octet-stream -->
          <remove fileExtension=".eot" />
          <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
          <remove fileExtension=".otf" />
          <mimeMap fileExtension=".otf" mimeType="font/otf" />
          <remove fileExtension=".woff" />
          <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
          <remove fileExtension=".crx" />
          <mimeMap fileExtension=".crx" mimeType="application/x-chrome-extension" />
          <remove fileExtension=".xpi" />
          <mimeMap fileExtension=".xpi" mimeType="application/x-xpinstall" />
          <remove fileExtension=".safariextz" />
          <mimeMap fileExtension=".safariextz" mimeType="application/octet-stream" />
          <!-- Flash Video mime types-->
          <remove fileExtension=".flv" />
          <mimeMap fileExtension=".flv" mimeType="video/x-flv" />
          <remove fileExtension=".f4v" />
          <mimeMap fileExtension=".f4v" mimeType="video/mp4" />
    

    I Hope this helps :)

    /Jan

  • Blake Watt (Clerke) 106 posts 351 karma points MVP
    May 06, 2014 @ 21:31
    Blake Watt (Clerke)
    0

    Thanks Jan! I added that section to the staticContent like you suggested. I updated the httpruntime maxrequestlength to 524288000 and I tested a 6MB image just to make sure that I could in fact upload larger than the default max size file and that worked. I do still have the security maxallowedcontentlength which is currently set to 524288000. I tried reuploading the video file again but it didnt work.

    I think it may be the video file type? I tested uploading some other large files into the media section and they all worked. I tried a 136MB PSD file, and a 228MB zip file and those uploaded just fine. So I think you guys have sucessfully helped me fix the file size upload limit, thank you very much! Again I'm sorry for the redundant post. I didn't realize I was having the same issue. =\

    I'm going to keep working on trying to figure out why my video isn't uploading though. Thank you bunches for the help so far!!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 06, 2014 @ 21:35
    Jan Skovgaard
    0

    Hi Blake

    Well I would be surprised if there is a server setting you need to set since it should be enough to define it at the application level, which is in the web.config file.

    Is it happening on a local site or a live site? If live...who is hosting the site?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 06, 2014 @ 21:36
    Jan Skovgaard
    0

    ...And if you set "customErrors" to "off"...do you then get a more detailed error message?

    /Jan

  • Blake Watt (Clerke) 106 posts 351 karma points MVP
    May 06, 2014 @ 21:48
    Blake Watt (Clerke)
    0

    Ah ha! I refreshed the page and I tried the video again to double check and I let it sit there for a while and it worked! It took a minute but it worked! =D yay!! Before the save button was graying out and it would just sit there and I hit reload nodes to see if it uploaded but nothing happened. I'm sure the changes you suggested to make to the web.config are what fixed it though because I haven't done anything else but sit here and try to upload giant files. Thank you so much for all your help!! =) I'm glad this is working now. It was the last piece to finish this portal.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 06, 2014 @ 21:50
    Jan Skovgaard
    1

    Hi Blake

    Very happy to hear that - was going out of my mind as well over this :D

    However it's probably because that v7 is caching a lot harder than we're used too so sometimes recycling the app pool is not enough.

    /Jan

  • Blake Watt (Clerke) 106 posts 351 karma points MVP
    May 06, 2014 @ 21:52
    Blake Watt (Clerke)
    0

    I must learn to be more patient now! :) Seriously, thank you so much for your help! I'm super grateful that the Umbraco community is so helpful! People like me need it! lol

  • Syed Rizvi 3 posts 72 karma points
    Sep 12, 2015 @ 18:58
    Syed Rizvi
    0

    I am stuck in the same situation. Did everything. Can anyone help me here. Just trying to add simple .mp4 videos via the media section on Umbraco 7

    I get in red NOT FOUND NOT FOUND errors

     <system.web>
    <customErrors mode="Off"/>
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5"  maxRequestLength="993600"  />
    
     <security>
        <requestFiltering>
          <requestLimits maxAllowedContentLength="4000000" />
        </requestFiltering>
      </security>
    
  • Galen Hale 1 post 72 karma points
    Dec 14, 2015 @ 21:45
    Galen Hale
    0

    Hi Syed, I was having the same problem. Getting rid of the

    <security> <requestFiltering> <requestLimits maxAllowedContentLength="4000000" /> </requestFiltering> </security>

    worked for me. All uploads started to work.

  • Biagio Paruolo 1583 posts 1814 karma points c-trib
    Jan 04, 2016 @ 14:21
    Biagio Paruolo
    0

    Hi, attention please. Into the U7 web.config, there is already the httpRuntime rule. So you need to add only the key maxRequestLength="153600" to that rule.

     <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" **maxRequestLength="153600"** />
    

    and you need add

     <!-- Max file size limitation --> 
    <security>   <requestFiltering>
    <requestLimits maxAllowedContentLength="157286400" />  
    </requestFiltering> </security>
    

    in the the system.webServer section

  • Shraddha G 5 posts 74 karma points
    Jun 13, 2017 @ 15:18
    Shraddha G
    0

    Hello Umbraco Team,

    We have a video upload feature within our Umbraco site. Earlier our client could upload 50 MB mp4 files on the live site. But recently they started getting the below error, when they upload approx 48 MB mp4 file. I tried on my local and UAT environment and I could upload 48 MB mp4 files by setting the maxRequestLength and maxAllowedContentLength values as mentioned in this discussion above. Any thoughts on what can be the other reason for file upload failure? (Is SQL database size need to be changed? or IIS/Firewall issue?) FYI, We recently upgraded our Umbraco to 7.5.3 version and on server we have IIS 8.5.

    Request error: The URL returned a 404 (not found): /standards/umbraco/backoffice/UmbracoApi/Media/PostSave with data: ... Contact your administrator for information.

    When we copied the same Umbraco database locally, we could upload 48 MB files.

Please Sign in or register to post replies

Write your reply to:

Draft