About the author

Miron Abramson
Software Engineer,
CTO at PixeliT
and .NET addicted for long time.
Open source projects:
MbCompression - Compression library

Recent comments



The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Creative Commons License

Blog Flux Directory
Technology Blogs - Blog Top Sites

Limit uploaded files size in FCKeditor

FCKeditor (Changed to CKEditor for some reasons) is the coolest editor for asp.net (it works also with lot of other languages). It is easy to implement, full of features and can be easily customized.

I use it for some personal sites. One important feature  that is missing is the option to control and limit the size of individual uploaded file. I know I can do it in the web.config using the httpRuntime section, but it will effect all the site. I wanted to control the limit of individual uploaded file. Since the ASP.NET FCKeditor is an open source, I downloaded the source and made some changes to conquer my needs. Below you can download the modified code, or the compiled dll (release mode).

To control the limits of the uploaded files, After you placed the modified dll in your BIN folder, dig into the folder  \editor\filemanager\connectors\aspx inside your editor folder. There you will find the file 'config.ascx'. The method 'SetConfig()' is the place you will made some changes:

Add TypeConfig["File"].MaxAllowdSize = 4096;  to set the maximum uploaded file to 4MB

Add TypeConfig["Image"].MaxAllowdSize = 2096; to set the maximum, uploaded image to 2MB

TypeConfig["Flash"].MaxAllowdSize = 2096; to set the maximum, uploaded flash to 2MB

TypeConfig["Media"].MaxAllowdSize = 4096; to set the maximum uploaded media file to 4MB

Of course the numbers can be change as your needs.

FredCK.FCKeditorV2.dll.zip (14.26 kb)

FCKEditor.NET_src.zip (61.11 kb)

Currently rated 5.0 by 5 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: ASP.NET
Posted by Miron on Friday, September 25, 2009 5:34 AM
Permalink | Comments (3) | Post RSSRSS comment feed

Related posts


Frank Chen tw

Wednesday, December 09, 2009 4:04 PM

Frank Chen

I used it for FCKeditor 2.0, but it does not work. Is that for FCKeditor 2.5 and above? It seems that 2.0 does not support "TypeConfig["Image"].MaxAllowdSize"

carson rose and associates us

Monday, April 26, 2010 3:37 AM

carson rose and associates

After reading your blog, i used the software and found it user friendly.Hoping to see more interesting stuff from you in fuiture.


Sunday, August 11, 2013 4:24 AM


Pingback from com-lab.biz

What are the limits to the size and quantity of css files f | user45