Log in or register to post comments
Last post
outsidedesign's picture
Joined: 03/06/2008
Posts: 6
how to set maxsize for file upload
Hi, I bought a licence for the ASP version of CK Finder last night and have implemented it on my client's site (using in conjunction with FCK). Everything is running great except that I can't figure out how to properly set the maxsize attribute in config.asp. If I try to upload a file large than 1Mb it returns a server error. I'd like to set it to 8M (as in the Example: 'maxSize' => "8M",)

I just need to know exactly (as in for newbies like me) where and how to change this, eg: do I add it after/instead of:
ResourceType.Add "maxSize", maxSize

or between the end quotes in:
CKFinder_Config.Add "DefaultResourceTypes", " "

Please could someone show me the exact full line of code for doing this so I get it right, for example the single quotes in the example mean that the script's interpreting the code as a quote in some of my attempts.

Many thanks.
alfonsoml's picture
Joined: 31/12/2006
Posts: 3743
Re: how to set maxsize for file upload
Hi.
Don't change anything inside the DefineResourceType function, you must instead adjust the parameters of each resource that it is created.

For example:
Set ResourceTypes(0) = DefineResourceType( _
   "Files", _
   baseUrl & "files", _
   baseDir & "files", _
   "8M", _
   "7z,aiff,asf,avi,bmp,csv,doc,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,zip", _
   "" _
   )


you just need to adjust that fourth parameter and all the rest should work.
outsidedesign's picture
Joined: 03/06/2008
Posts: 6
Re: how to set maxsize for file upload
Many thanks for getting back to me so quickly. I will try this and get back to you if I hit any problems.
thanks again...
outsidedesign's picture
Joined: 03/06/2008
Posts: 6
Re: how to set maxsize for file upload
Unfortunately it didn't work. I added the "8M" where you suggested and in "images" settings, then I tried to upload a 1.9MB file without success. Error message:
"Security Error. You probably don't have enough permissions for upload. Please check you server."

I take it that this isn't anything to do with CK Finder and is down to my server not accepting the size of upload. Any ideas where I can change this setting (server runs on Windows 2003)?

cheers...
alfonsoml's picture
Joined: 31/12/2006
Posts: 3743
Re: how to set maxsize for file upload
This is one of the pages that explain how to increase the default upload limit in IIS:
http://www.banmanpro.com/support2/File_ ... limits.asp