RSS Feed MattJura.com
Register Login

Allow large file uploads using TelerikEditorProvider in DotNetNuke 6

Very often we come across the requests to set larger file uploads for the editor in DotNetNuke.
The default setting allows you to upload 4mb which if you want to upload media files is not enough.

Here are the changes required to upload larger files via editor and file manager in DotnetNuke.
The example is based on using the TelerikEditorProvider set as the default html editor for the site and is based on DNN 6.01+

1. Setting the TelerikEditorProvider as the default editor for the site.

Under host HTML Editor Manager you can see the current provider and change it if required to TelerikEditorProvider

HTML Editor Provider settings in DNN

2. Set the default upload size for the file managers
By clicking on Everyone under Default Configuration you can access the editor settings. In the editor configuration tab you can allow additional file extensions  (make sure they are set as allowed under host settings as well) and set the file upload size for all types of file managers.
The values are in bytes so for example 524288000 = 500mb.

Here are the settings for the Media Manager.

Media Manager in DNN

 

3. Change the ConfigDefault.xml values
If after this you still can see only 4mb as allowed file size in the editor you will have to digg in a bit deeper. Download (make sure you make the back up) ConfigDefault.xml from  /Providers/HtmlEditorProviders/Telerik/Config/

Change the required manager properties

<property name="MediaManager.MaxUploadFileSize">4194304</property>

for 500mb upload change to

<property name="MediaManager.MaxUploadFileSize">524288000</property>

The values are in bytes 524288000 = 500mb

save an upload to /Providers/HtmlEditorProviders/Telerik/Config/ overwiting the current file.

4. Changes in the web.config file
Make sure you make the back up and than find the following code

<!-- Forms or Windows authentication -->
    <authentication mode="Forms">
      <forms name=".DOTNETNUKE" protection="All" timeout="60" cookieless="UseCookies" />
    </authentication>
    <!--
    <identity impersonate="true"/>
    <authentication mode="Windows">
    </authentication>
    -->
    <!-- allow large file uploads -->
    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" />

First change

<forms name=".DOTNETNUKE" protection="All" timeout="60" cookieless="UseCookies" />

to
<forms name=".DOTNETNUKE" protection="All" timeout="9000" cookieless="UseCookies" />

This will prevent the timeout during upload, the value is in seconds.

Than change

<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" />

to

<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="512000" requestLengthDiskThreshold="512000" />

 

This value is in kilobytes 512000 = 500mb

In some cases this should be all, however if you receive I/O error during upload there is another line of code you need to add in web.config
in
<configuration>
<system.web> section.

<configuration>
...
    <system.web>
      <httpRuntime maxRequestLength="512000" executionTimeout="9000" />
      ...
    </system.web>
</configuration>

 

The maxRequestLength value is in kilobytes 512000 = 500mb

5, Changes in IIS7

Sometimes in IIS7 and if you have access to the server you may need to check that the overrideModeDefault property is set to to "Allow" in C:\Windows\System32inetsrv\config\applicationHost.config

<section name="requestFiltering" overrideModeDefault="Allow" />

Following these steps you should be able to set the file upload limits up to 2GB.

 

Comments

There are currently no comments, be the first to post one.

Post Comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

Matt Jura

Matt is a Front End Developer, UI designer, DotNetNuke, E-commerce and SEO specialist, responsible for large number of websites, including e-commerce and online catalogues for domestic and international clients.
View my portfolio on Behance
View my profile on KLOUT
Add me to your circles
Follow me on Twitter


Matt Jura on Twitter
New project going strong http://t.co/xBA4Zx04 #DotNetNuke Posted 27 days ago
@eagleworx tanks, these are txt/HTML tokens, I was looking for skin object - see 40fingers skin on codeplex. Resolved with txt/html :) Posted 53 days ago
@MattsDailyTweet #DotNetNuke User Avatar <img src="[PROFILE:PHOTO]" /> pasted in the editor as raw text + token replacement on Posted 53 days ago
Little help required #DotNetNuke - what is a skin token for the UserPhoto (avatar) - dnn 6.1+ Posted 53 days ago
Finally in new office, nearly a week later than planned but worth it, do not try to call me on old number :-) Posted 58 days ago
@darthberne @presleysylwia no to ustalmy date I powod sie znajdzie, moze w przyszlym tygodniu Posted 67 days ago
@presleysylwia @darthberne to moze wymyslimy powod na spotkanie I zrealizujemy pomysl na wspolne piwko ? Posted 67 days ago
@darthberne @presleysylwia powoli do przodu, nie mam co narzekac, caly czas w tym samym miejscu i z usmiechem na buzce :) Posted 67 days ago

Follow me

WSI DNN services