feat(event_handler): add File parameter support for multipart/form-data uploads#8093
Open
leandrodamascena wants to merge 3 commits intodevelopfrom
Open
feat(event_handler): add File parameter support for multipart/form-data uploads#8093leandrodamascena wants to merge 3 commits intodevelopfrom
leandrodamascena wants to merge 3 commits intodevelopfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8093 +/- ##
===========================================
- Coverage 96.63% 96.62% -0.01%
===========================================
Files 283 283
Lines 13862 13969 +107
Branches 1111 1136 +25
===========================================
+ Hits 13395 13498 +103
Misses 342 342
- Partials 125 129 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue number: closes #7124
This PR is a continuation of the work from PR #7132 opened by @oyiz-michael.
Summary
Customers can now handle file uploads in your API endpoints with full OpenAPI validation and Swagger UI support - just like you'd do with
Query(),Header(), orForm().Changes
User experience
Simple file upload
File upload with form fields
Two ways to receive files
Annotated[bytes, File()]Annotated[UploadFile, File()]Swagger UI
Swagger renders a file picker for every
File()parameter - no extra configuration needed.API Gateway REST API (v1)
If using REST API v1, you must configure Binary Media Types in your SAM/CloudFormation template:
API Gateway HTTP API (v2), Lambda Function URL, and ALB work out of the box.
A
warnings.warn()is emitted at runtime if a multipart request arrives without base64 encoding, helping developers catch missing configuration early.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.