fasthtml
fasthtml copied to clipboard
Fix single file uploads in multi-file forms
name: Pull Request about: Propose changes to the codebase title: '[PR] Fix single file uploads in multi-file forms' labels: 'bug' assignees: ''
Related Issue
#513 Uploading a single file on a multiple file field requires a try/except block
Proposed Changes
If the annotation for the response element says it is a GenericAlias
(which roughly means 'iterable') but the response element isn't actually iterable, then wrap it in a list.
Types of changes
What types of changes does your code introduce? Put an x
in all the boxes that apply:
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
Go over all the following points, and put an x
in all the boxes that apply:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] I am aware that this is an nbdev project, and I have edited, cleaned, and synced the source notebooks instead of editing .py or .md files directly.
Additional Information Any additional information, configuration or data that might be necessary to reproduce the issue.