tags:

views:

180

answers:

3

I just wanted to know how to configure FCKEditor to upload files and images to the server where the website is hosted.

The relevant part for it's config file(i think) looks like this:

FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
FCKConfig.LinkUploadAllowedExtensions   = ".(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|xml|zip)$" ;            // empty for all
FCKConfig.LinkUploadDeniedExtensions    = "" ;  // empty for no one

FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions  = ".(jpg|gif|jpeg|png|bmp)$" ;      // empty for all
FCKConfig.ImageUploadDeniedExtensions   = "" ;                          // empty for no one

Could it be a folder permission problem? Is this part of the config.js alright?

A: 

You don't state what language you are using. The fileupload functionality in FCKeditor has ASP, .NET, Coldfusion and PHP uploaders, amongst others. It would help if you said what server (IIS/Linux?) and serverside language you are using.

With limited information its a long shot but there's settings in fckconfig.js for configuring your file browser (around line 276) Make sure you have the right language selected:

var _FileBrowserLanguage    = 'php' ;   // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage    = 'php' ;   // asp | aspx | cfm | lasso | perl | php | py

You'll also have to set write permissions on the folder structure you are uploading to (which might be the cause of the "invalid request" error, but process to edit file permissions is different depending if you are using windows or linux.

Its not well documented, but its also possible to debug the file manager settings by going to the following URLs in a browser:

/fckeditor/editor/filemanager/connectors/test.html

and

/fckeditor/editor/filemanager/connectors/uploadtest.html

The upload test scripts are very useful and can help diagnose many problems - you can see errors easier for a start. Give them a try and you should have a better idea what the problem is.

Darren
It's solved, thanks anyway. I just had to add the "Files" type to some variable at the config.aspx file. It only had "Images", so that's why I couldn't upload files.
Brian Roisentul
A: 

Brian, what exactly was it that you did?

Mac
I added the "Files" type to some variable at the beginning of config.aspx(under the folder of your programming language) file that only said "Images". So you'll have something like this: ("Images", "Files")
Brian Roisentul
A: 

It's solved, thanks anyway. I just had to add the "Files" type to some variable at the config.aspx file. It only had "Images", so that's why I couldn't upload files

Brian Roisentul

related questions