Uploading files using FCKEditor

Status
Not open for further replies.

grandad

Member
I'm building a CMS system for a client at the moment. All is going well, except they want the ability to upload PDF files.

I installed the easyUpload plugin which nicely provides for file uploads, but for some reason the system keeps rejecting PDF files ['file type not allowed' or some such crap].

The configuration is as follows, which should allow all files bar the excepted ones.

Code:
$Config['AllowedExtensions']['File']    = array() ;
$Config['DeniedExtensions']['File']        = array('html','htm','php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','htaccess','asis') ;
Has anyone any experience of this?

P.S. As you may gather, I'm using the PHP script...
 

louie

New Member
change this to:
PHP:
$Config['AllowedExtensions']['File']    = array('pdf') ;//and add one by one separated by , like 'pdf', 'txt'
 

louie

New Member
if you are using FKEditor you need to enable the upload feature and what connectors you are using.
First open the fckconfig.js file and find:
Code:
var _FileBrowserLanguage = 'php' ; 
var _QuickUploadLanguage = 'php' ;
make sure they have php as value

then go to editor->filemanager->upload->php->config.php
open that file and make sure this line is true:
Code:
$Config['Enabled'] = true ;
and then the others have the right extension:
PHP:
$Config['AllowedExtensions']['File'] = array('pdf') ;
$Config['DeniedExtensions']['File']  = array('php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi') ;
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
 

grandad

Member
Apologies for the delay - had to go out for a while....

This is very strange. According to their documentation, "array() ;" allows all file types. I was able to upload DOC files with no problem using this configuration. I changed it to Louis' example [thanks Louis] and explicitly declared the extensions and it now works!

Brilliant.

Thanks lads.
 
Status
Not open for further replies.
Top