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

Upload make configurable check for accepted files #7501

Open
Manfred-on-github opened this issue Jun 27, 2024 · 0 comments
Open

Upload make configurable check for accepted files #7501

Manfred-on-github opened this issue Jun 27, 2024 · 0 comments
Labels
enhancement New feature or request vaadin-upload

Comments

@Manfred-on-github
Copy link

Manfred-on-github commented Jun 27, 2024

Describe your motivation

vaadin upload component has a property "accept", where you can specify what files to accept, e.g. '*.pdf'.
This has two effects:
(1) a filter *.pdf is added to the file-select dialog which the browser opens. This helps users to select the correct file type.
(2) a check is enabled in the component's javascript code that accepts only correct file types. This functionality was added only with some recent version (23 or 24).

While this is good in general, we would like to have an option to disable (2) - or more flexible to be able to supply the checking code.

Reason is: at least on Windows, both in Firefox and Chrome, even when one specifies *.pdf, the browser always adds the option*.*which user can select. It is ok for our application that user can pass any file, still we want this 'accept' feature as initial filter for user.

Describe the solution you'd like

we would like to have an option to disable the file name check in vaadin code (around vaadin-upload-mixin __acceptRegexp) - or (more flexible) to be able to supply the checking code.

Describe alternatives you've considered

of course we could leave empty the property "accept", but then the user will have no hint on what might be the "preferred" content they can upload here.

Additional context

No response

@web-padawan web-padawan added enhancement New feature or request vaadin-upload labels Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaadin-upload
Projects
None yet
Development

No branches or pull requests

2 participants