Changing allowed file extensions globally

7 posts by 5 authors in: Forums > CMS Builder
Last Post: January 28, 2015   (RSS)

I would like to add pdf to the allowed upload extensions in PageContent wsywig.  I know how to do this on each page but wondered if there is a file I can modify that would make this auto for all pages?

By Toledoh - January 26, 2015

Hey Damon,

I think it would be good to have this change done globally for the next CMSB update.  Really, I think wmv, mov, swf are not required, but PDF is a very common requirement.  Or maybe adding a section to settings that allows this to be controlled globally?

Cheers,

Tim (toledoh.com.au)

I agree, great idea.  In the meantime I was able to grab the files in /data/schema/ and do a find and replace to add pdf to all.  Then upload them via ftp and you are good to go.  Saved me from having to go into each section editor.

By claire - January 27, 2015

Referred this to Dave for possible inclusion in a future release of CMSB. Thanks guys!

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Dave - January 27, 2015

Hi All, 

Currently the default value is stored in /lib/menus/database/editField_functions.php

and it looks like this:

$defaultValue['allowedExtensions']     = 'gif,jpg,png,wmv,mov,swf,pdf';

So if you change that it will change the list of allowed extensions that appear by default when you add a new field.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

Even better than my method!  Thanks.  :)