sunhater / kcfinder

KCFinder web file manager
http://kcfinder.sunhater.com
402 stars 209 forks source link

Validation to accept only GIF images #163

Open ashalathapalagiri opened 6 years ago

ashalathapalagiri commented 6 years ago

I have configured kcfinder with ckeditor.Need to set an validation to accept only gif images.It should not accept any png,jpeg format images. configuration of kcfinder in ckeditor (config.js)

config.filebrowserBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=files'; config.filebrowserImageBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=images'; config.filebrowserFlashBrowseUrl = '/kcfinder/browse.php?opener=ckeditor&type=flash'; config.filebrowserUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=files'; config.filebrowserImageUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=images'; config.filebrowserFlashUploadUrl = '/kcfinder/upload.php?opener=ckeditor&type=flash';

As i have tried by adding these lines in config.php but it doesn't work.

'types' => array( // The folowing directory types are just for an example 'files' => "", 'flash' => "swf", 'media' => "swf flv avi mpg mpeg qt mov wmv asf rm", 'misc' => "! pdf doc docx xls xlsx", 'images' => "img", 'mimages' => "mime image/gif image/png image/jpeg", 'notimages' => "*mime ! image/gif image/png image/jpeg" ),

Can anyone tell me how to validate it to accept only gif images.