On http://samplesite.com/admin/settings/uploads, there is a ist of default permitted file extensions; unfortunately, it only accepts so much text ( have ~ 40 formats listed and want more). Is there another way to allow certain file extensions, such as editing a file that lists all allowed extensions?

Comments

ayesh’s picture

Don't know a module but may be a very very little module to alter the form (to a text area) ? Killing a kitten and hacking core is an option as well :)

winthropite’s picture

I was thinking it may be editing one of the files in site/modules/upload but I don't know which file or even if it's the right place to make these changes.

winthropite’s picture

I found it. You can edit the character count on line 87 of upload.admin.inc
'#maxlength' => 255,
Hopefully if someone else has the same issue they'll be able to find this here with a google search.

winthropite’s picture

I changed the file to reflect '#maxlength' => 999 and ran update.php but it still kept the 255 character max. Might anyone know why, or how to overcome this?

I saw this addressed here http://drupal.org/node/146016 but with no result.

winthropite’s picture

Ok, I found it for sure. In addition to changing the character count on line 87 of upload.admin.inc from
'#maxlength' => 255,
to
'#maxlength' => 999,
I also changed the character count on line 125 of upload.admin.inc to
'#maxlength' => 999,
from the same default of 255. After I ran update.php I tested it and it fits 999 characters now.
Hopefully if someone else has the same issue they'll be able to find this here with a google search.

ayesh’s picture

Great you could find it and even more great you shared it :)

benjaminlhaas’s picture

You can do this very easily without hacking core files. Just create your own very simple module and implement hook_form_alter (http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...).