I just tried to upload some modern Word documents, which fail validation, because docx is not supported in this function:

/**
 * Helper function to add defaults to $element['#upload_validators'].
 */
function _plupload_default_upload_validators() {
  return array(
    // See file_save_upload() for details.
    'file_validate_extensions' => array('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'),
  );
}

Patch in a bit.

CommentFileSizeAuthor
#1 1454326-plupload-validators.patch742 bytesagentrickard
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Status: Active » Needs review
FileSize
742 bytes

Not sure this matters, since it is overridden by media module via the UI.

slashrsm’s picture

Status: Needs review » Closed (works as designed)

This is just default setting. Any implementing module can set it's own. If you use media navigate to admin/config/media/browser, where you can set this.

Katrina B’s picture

Actually, setting the allowed extensions didn't work for me. I have an image field set to use jpeg, jpg, png, and gif -- but after changing the widget type to plupload (using Plup and Plupload modules and plupload library), I cannot upload .jpg files,

slashrsm’s picture

That should be reported in Plup's issue queue then. AFAIK Plup doesent even need this module, as it implementes it's own integration with plupload library.