Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Benjamin-K opened this issue Jun 5, 2018 · 1 comment
Open

Comments

@Benjamin-K
Copy link

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).

@bwaidelich
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants