#226 - Restrict accepted mimetypes in file widget#1246
#226 - Restrict accepted mimetypes in file widget#1246epicfaace merged 8 commits intorjsf-team:masterfrom
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? |
epicfaace
left a comment
There was a problem hiding this comment.
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-formaton my branch to conform my code to prettier coding style