Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Validation to accept only GIF images #163

Open
ashalathapalagiri opened this issue Sep 14, 2017 · 0 comments
Open

Validation to accept only GIF images #163

ashalathapalagiri opened this issue Sep 14, 2017 · 0 comments

Comments

@ashalathapalagiri
Copy link

ashalathapalagiri commented Sep 14, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant