I found that functionality of disallow file formats doesn't work if file upload field allows multiple values. It requires some corrections in module fff and maybe even in Drupal Core.

Comments

eugene.ilyin created an issue. See original summary.

eugene.ilyin’s picture

Title: Doesn't work with multiple values field » Functionality of disallow file formats doesn't work if file upload field allows multiple values
Issue summary: View changes

  • eugene.ilyin committed 7063eb8 on 8.x-1.x
    Issue #2594851 by eugene.ilyin: Functionality of disallow file formats...
eugene.ilyin’s picture

I've corrected this problem but for each render of the element will be notice
Notice: Undefined offset: 0 in template_preprocess_file_upload_help() (line 186 of core/modules/file/file.field.inc).

It can be solved in related issue #2594389.

If somebody can propose an alternative solution, I would be happy!