Basically, in order to allow certain file extensions to be uploaded via the CMS editor, we would need to override the normal config configuration.
As you probably know, all the config.xml files in Magento are gathered together everytime the system runs, and the overriden files (local) take priority over those in the core.
Thus, we can create an extension, or add the following lines to one of our current extensions config.xml file (inside the config tag):
<adminhtml> <cms> <browser> <extensions> <allowed> <jpg>1</jpg> <jpeg>1</jpeg> <png>1</png> <gif>1</gif> <pdf>1</pdf> </allowed> <image_allowed> <jpg>1</jpg> <jpeg>1</jpeg> <png>1</png> <gif>1</gif> <pdf>1</pdf> </image_allowed> </extensions> </browser> </cms> </adminhtml>
This is how we define all the file extensions to be allowed.
In case we would like to disallow jpg files from being uploaded, we would do this:
<jpg>0</jpg>
in both places.