I've tried to modify the mass contact attachment file field to allow docx files, but is does not seem to work.
It states that only theses (standard drupal?) files are allowed: jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp
I dont understand where these settings come from. In D6 you could edit standard file-types, but this field is missing in D7 and replaced by the file-field setting.

Are there other places to edit allowed attached files? any good solution? is this a bug?
-thanks

Comments

oadaeh’s picture

Title: File-type not allowed in attachments » Add administrative UI to allow sysadmin to specify allowed type of attachments
Category: bug » feature

This is a "feature" of Drupal 7. See the description of $validators on http://api.drupal.org/api/drupal/includes!file.inc/function/file_save_up....

For a quick and dirty fix, you can change line 927 of mass_contact.page.inc from

        $file_validators = array();

to

        $file_validators = array('file_validate_extensions' => array());

keeping in mind that this allows anyone to send any type of file.

I guess I should add an administrative UI to allow the sysadmin to change this.

plastikkposen’s picture

UI way to go, but meanwhile thanks a lot for the dirty fix!

plastikkposen’s picture

Issue summary: View changes

adding text