This is a migrated thread and some comments may be shown as answers.

MaxFileSize and MaxUploadSize

1 Answer 175 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Cavit
Top achievements
Rank 1
Cavit asked on 25 Jun 2015, 04:41 PM

Hi,

Does RadAsyncUpload have anything simillar to MaxUploadSize of Silverlight based control ?

I want to limit the users max 4GB of file. MaxFileSize is an integer allows me to limit max 2GB.

Can you tell me how can I come over these issues ?

Regards

Deepak
Top achievements
Rank 1
commented on 01 Feb 2024, 12:54 PM

I want to increase MaxFileSize upto 2GB in below ASP.NET code 

 <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MaxFileInputsCount="10"
                                            MaxFileSize="524288000" MultipleFileSelection="Automatic" OnClientFileSelected="fileSelected"
                                            OnClientFileUploaded="fileUploaded" EnableViewState="False">
Rumen
Telerik team
commented on 01 Feb 2024, 02:53 PM

Hi Deepak,

To increase the MaxFileSize property to support up to 2GB in your ASP.NET code using the Telerik RadAsyncUpload control, you should specify the MaxFileSize in bytes. Since 1GB equals 1,073,741,824 bytes, for 2GB, you would set it to 2,147,483,648 bytes.

However, you should be aware that increasing the MaxFileSize to such a large value also requires adjustments in the web server settings to handle such large uploads. For ASP.NET applications, this involves changes in the web.config file to increase the maxRequestLength (for IIS 7+) and the maxAllowedContentLength settings.

Here is how you would modify your RadAsyncUpload control and what you should add to your web.config:

RadAsyncUpload Control Modification

<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MaxFileInputsCount="10"
                                        MaxFileSize="2147483648" MultipleFileSelection="Automatic" OnClientFileSelected="fileSelected"
                                        OnClientFileUploaded="fileUploaded" EnableViewState="False">

web.config Modifications
You need to modify the httpRuntime and requestFiltering settings in your web.config file:
<configuration>
  <system.web>
    <!-- The maxRequestLength is in kilobytes (KB) -->
    <httpRuntime maxRequestLength="2097152" executionTimeout="3600" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <!-- The maxAllowedContentLength is in bytes -->
        <requestLimits maxAllowedContentLength="2147483648" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 30 Jun 2015, 12:42 PM
Hello,

RadAsyncUpload for ASP.NET AJAX has a MaxFileSize property, which specifies the maximum size of each of the uploaded files in bytes. Unlike RadUpload for Silverlight it does not have a MaxUploadSize property.

Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
Cavit
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or