neos/form-builder

Allow file elements to accept all files / further file types.

Opened this issue · 1 comments

Description

When adding the a new element of type "File" the File-Validator is automatically added to this element. This leads to the problem, that no file could be uploaded unless you select an allowed file ending in the sidebar. Also the default values selectable in the sidebar are only document types (office, open office and pdf).

Steps to Reproduce

  1. Add a new File element to any formbuilder form and publish changes.
  2. Try to submit the form with any file.
  3. See the error: The file extension "png" is not allowed.

Expected behavior

If no filetype is selected as "Allowed filetypes", all files should be allowed in the validation/no validation should be done.

Actual behavior

If no filetype is selected, all files fail in the validation.

Additional feedback

Besides removing the requirement to select at least one allowed filetype and allow all file types then, it would be great to have further file types in the defaults (no need to add them in the NodeTypes.yaml of ones Site package).

If no filetype is selected as "Allowed filetypes", all files should be allowed in the validation/no validation should be done.

I think that's a rather dangerous default behavior..

Maybe we can find a way to make this a required option or to define some sane defaults. But IMO it's not a common requirement to allow all file types - and for those cases one could always create a custom element, it's just a few lines