The forum operates in
mode. Please head to
Fri, 01/23/2009 - 11:03
fckeditor quickupload, set max file size for images / files
Does anyone know how to do this with ASP.NET integration?
Thanks in advance,
Fri, 02/13/2009 - 00:34
Re: fckeditor quickupload, set max file size for images / files
This came up again and after a disappointing silence from the forum, I decided to have a hack around with FileWorkerBase.cs, TypeConfig.cs and Config.cs.
My solution is:
Add a public int MaxUploadSize prop to the TypeConfig class
Add lines similar to this where necessary in Config.cs to limit the file size for specific resoures: TypeConfig[ "Image" ].MaxUploadSize = 40960;
Add this code to FileWorkerBase as a validation method before the file is saved:
if ((this.Config.TypeConfig[resourceType].MaxUploadSize != -1) && (oFile.ContentLength > this.Config.TypeConfig[resourceType].MaxUploadSize))
this.SendFileUploadResponse(1, true, "", "", "The file is too large");