Commit 4e897c7
committed
fix: convert UploadFile to bytes for File() parameter validation
- Added UploadFile-to-bytes conversion in _normalize_field_value()
- Handles type annotations including Annotated[bytes, File()]
- Fixes 24 failing tests in test_file_parameter.py
- All tests now return 200 OK instead of 422 validation errors
Resolves multipart form data parsing issue where UploadFile instances
weren't being converted to bytes before Pydantic validation.1 parent d81b87f commit 4e897c7
File tree
1 file changed
+15
-0
lines changed- aws_lambda_powertools/event_handler/middlewares
1 file changed
+15
-0
lines changedLines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
600 | 615 | | |
601 | 616 | | |
602 | 617 | | |
| |||
0 commit comments