[Multiple File Upload] Max file size for upload
Question
Forge component by Hugo Pinheiro

Hi,

What is the maximum file size that can be uploaded, i have tried uploading 30MB JPG file was successfull , further tried uploading 50MB file i am getting error "File Size limit exceeded, Maximum of 30Mb file can be uploaded"

Can this limit be extended?

Component version 11.0.406.0

Service Studio version 11.5.44 Build 2746

Thanks in Advance

Maybe you can find the solution here?


https://www.outsystems.com/forums/discussion/37130/not-able-to-upload-video-that-more-than-150mb/


it seems your IIS has a limit. I don't think its the compnent causing the issue.

Champion

Hi Suresh,


Stefano is right, these values are set in IIS settings. In the installation checklist document, there is a point to increase this limit.

But you can also solve this problem by following the steps outlined in the link suggested by Stefano


Installation Checklist:


Regards

After doing the following i have been able to upload large files up to 1 GB.


Solution to large file upload

  • Configure maxRequestLength, timeout in machine.config in the directory C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
  •     <httpRuntime executionTimeout="3600" maxRequestLength="1782579" />

  • If maxAllowedContentLength does not exist in web.config, add the following configuration

<system.webServer>

          <security>

                 <requestFiltering>

                        <requestLimits maxAllowedContentLength="1825361100" />

                 </requestFiltering>

          </security>

   </system.webServer>

  • In C:\Windows\System32\inetsrv\config\applicationHost.config, modify maxRequestEntityAllowed and uploadReadAheadSize values (same as maxAllowedContentLength)

<serverRuntime maxRequestEntityAllowed="1825361100" uploadReadAheadSize="1825361100" />


  • In Factory Configuration module do the following steps:



Shared Configurations tab à Create New Shared Configuration

https://lcdev1/FactoryConfiguration/ListSharedConfigurations.aspx

select web.config_XSL type


Then add the following configuration for maxRequestLength, executionTimeout, and maxAllowedContentLength)


<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


  <xsl:output method="xml" indent="yes" encoding="UTF-8"/>


  <!--

      Description

      This xslt is used to add uploading of large files capabilities to a outsystems eSpace on IIS.

      - It will upsert the attribute system.web/httpRuntime/@maxRequestLength (<=IIS6).

      - It will upsert the attribute system.webServer/security/requestFiltering/requestLimits/@maxAllowedContentLength (>=IIS7).

  -->


  <!-- Just copy all other xml parts, that don't have a specific template match. -->

  <xsl:template match="@*|node()">

    <xsl:copy>

      <xsl:apply-templates select="@*|node()"/>

    </xsl:copy>

  </xsl:template>


  <xsl:template match="configuration">

<!-- Create an "configuration" element in the output document. -->

<configuration>

   

    <!-- Copy child elements to output document. -->

    <xsl:apply-templates select="@*|node()"/>


    <!-- If the element "system.web" does not exist, create it in the output document. -->

    <xsl:if test="count(system.web) = 0">

      <system.web>

        <httpRuntime maxRequestLength="1782579"  executionTimeout="3600" />

      </system.web>

    </xsl:if>  


    <!-- If the element "system.webServer" does not exist, create it in the output document. -->

    <xsl:if test="count(system.webServer) = 0">

    <system.webServer>

        <security>

            <requestFiltering>

                <requestLimits maxAllowedContentLength="1825361100"/>

            </requestFiltering>

        </security>

    </system.webServer>

    </xsl:if>

</configuration>

  </xsl:template>


  <!-- If the element "system.web/httpRuntime" does not exist, add it. -->

  <xsl:template match="system.web[not(httpRuntime)]">

    <system.web>

      <xsl:apply-templates select="@*|node()"/>

      <httpRuntime maxRequestLength="1782579" executionTimeout="3600" />

    </system.web>

  </xsl:template>


  <!-- If the attribute "system.web/httpRuntime/@maxRequestLength" does not exist, add it. -->

  <xsl:template match="system.web/httpRuntime[not(@maxRequestLength)]">

    <xsl:copy>

      <xsl:apply-templates select="@*|node()"/>

      <xsl:attribute name="maxRequestLength">

        <xsl:value-of select="'1782579'"/>

      </xsl:attribute>

     <xsl:attribute name="executionTimeout">

      <xsl:value-of select="'3600'"/>

    </xsl:attribute>

    </xsl:copy>

  </xsl:template>

 

  <!-- If the attribute "system.web/httpRuntime/@maxRequestLength" exists update it. -->

  <xsl:template match="system.web/httpRuntime/@maxRequestLength">

    <xsl:attribute name="maxRequestLength">

      <xsl:value-of select="'1782579'"/>

    </xsl:attribute>

   <xsl:attribute name="executionTimeout">

      <xsl:value-of select="'3600'"/>

    </xsl:attribute>

  </xsl:template>


  <!-- If the element "system.webServer/security" does not exist, add it. -->

  <xsl:template match="system.webServer[not(security)]">

    <system.webServer>

      <xsl:apply-templates select="@*|node()"/>

      <security>

        <requestFiltering>

          <requestLimits maxAllowedContentLength="1825361100"/>

        </requestFiltering>

      </security>

    </system.webServer>

  </xsl:template>


  <!-- If the element "system.webServer/security/requestFiltering" does not exist, add it. -->

  <xsl:template match="system.webServer/security[not(requestFiltering)]">

    <security>

      <xsl:apply-templates select="@*|node()"/>

        <requestFiltering>

          <requestLimits maxAllowedContentLength="1825361100"/>

        </requestFiltering>

    </security>

  </xsl:template>


  <!-- If the element "system.webServer/security/requestFiltering/requestLimits" does not exist, add it. -->

  <xsl:template match="system.webServer/security/requestFiltering[not(requestLimits)]">

    <requestFiltering>

      <xsl:apply-templates select="@*|node()"/>

        <requestLimits maxAllowedContentLength="1825361100"/>

    </requestFiltering>

  </xsl:template>


  <!-- If the attribute "system.webServer/security/requestFiltering/requestLimits/@maxAllowedContentLength" does not exist, add it. -->

  <xsl:template match="system.webServer/security/requestFiltering/requestLimits[not(@maxAllowedContentLength)]">

    <xsl:copy>

      <xsl:apply-templates select="@*|node()"/>

      <xsl:attribute name="maxAllowedContentLength">

        <xsl:value-of select="'1825361100'"/>

      </xsl:attribute>

    </xsl:copy>

  </xsl:template>


  <!-- If the attribute "system.webServer/security/requestFiltering/requestLimits/@maxAllowedContentLength" exists update it. -->

  <xsl:template match="system.webServer/security/requestFiltering/requestLimits/@maxAllowedContentLength">

    <xsl:attribute name="maxAllowedContentLength">

      <xsl:value-of select="'1825361100'"/>

    </xsl:attribute>

  </xsl:template>


</xsl:stylesheet>


Useful Links:

https://www.outsystems.com/forums/discussion/37130/not-able-to-upload-video-that-more-than-150mb/

https://www.outsystems.com/forums/discussion/70771/error-uploading-large-file-size-gt-600mb-using-multiplefileupload-component/#

https://stackoverflow.com/questions/63833894/iis-uploadreadaheadsize-value-meaning

https://docs.microsoft.com/en-us/iis/configuration/system.webserver/serverruntime

https://forums.iis.net/t/1217850.aspx

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.