-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Remove validation support #397
Comments
As the author of #127, I support this change, provided that there is a documented upgrade path. |
@jelhan I agree that we should drop this feature |
Closed
3 tasks
gilest
added a commit
that referenced
this issue
Oct 26, 2021
…578) Adds `@onSelect` callback arg to FileUpload. Implementers may optionally return a list of filtered files from this callback to validate user selection. Modifies `@onDrop` callback arg in FileDropzone. Implementers may optionally return a list of filtered files from this callback to validate user selection. Fixes #397
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ember File Upload currently supports validation of files per mime type and extension. But this feature has some bugs and unexpected behaviors:
<FileUpload>
may allow a file to be uploaded, which fails validation rules enforced by<FileInput>
.On
<FileUpload>
it only setsaccept
HTML attribute. It does not validate if the given file matches the validation after it's selected. Some browser allow the user to ignore theaccept
list.<FileDropzone>
validates all files and blocks upload if not passing accept criteria.<FileDropzone>
via drag and drop happens too late.Due to this reasons I propose that we drop that feature. Instead we should provide APIs to plugin validation by consumers.
Previous discussions can be found in #127 and #376
As this would be a fundamental change affecting capabilities of this addon I would like to have great consent before moving forward.
The text was updated successfully, but these errors were encountered: