-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
#226 - Restrict accepted mimetypes in file widget #1246
#226 - Restrict accepted mimetypes in file widget #1246
Conversation
@gr8pathik looks good, can you add a test? |
@epicfaace I don't think this can have any test. Because we cannot use the accept attribute as a validation tool. It is just used to hint to browsers to only show files that are allowed for the current input. |
@gr8pathik I just meant that you could make a test like the one here -- https://github.com/mozilla-services/react-jsonschema-form/blob/679b38115eeb0e808ced6d39fcf3da3b9721b69c/test/ObjectField_test.js#L185 -- just to see if the widget with the proper attribute is rendered. Also, I believe the uiSchema in the playground should be changed from |
@epicfaace Added the test cases. |
@gr8pathik thanks! Can you add a section for documentation of this option over here: https://react-jsonschema-form.readthedocs.io/en/latest/form-customization/#file-widgets |
@epicfaace I have updated the documentation. |
Thanks! Can you accept my suggestion -- and then we should be good to go. |
|
@epicfaace is there any issue with this PR or we are good to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay -- I missed your commit. Just one more grammatical thing to add.
When should we expect the next release to land with this added? |
Once #1419 is merged |
Reasons for making this change
If this is related to existing tickets, include links to them as well.
#226 - Restrict accepted mime types in file widget
Checklist
npm run cs-format
on my branch to conform my code to prettier coding style