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.
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
Add multipart/form-data response builders to axum-extra #2654
Add multipart/form-data response builders to axum-extra #2654
Changes from 5 commits
1fb8685
dfa4fa0
345fd56
f64975c
c8ccb72
7cde253
580d6b0
59338d3
ddf8f91
1b40c90
9cd395c
8d15186
82151ba
c84a724
3731499
4a01b84
b4487c3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We already depend on
mime
so I'd suggest using that to construct the string. It could avoid some typo bugs. It would be great if it would be possible to use it also for the multi part content type. I don't know if it's possible with the dynamic boundary though.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.
Right now all of the
Part::*
constructors return Self directly, butPart::raw_part
relies on a mime type passed in as an argument.I know that it's generally considered bad practice to add third party crates to the public api without good cause, but the only other option I can see here is having the function internally parse the provided string into a valid mime type, which should return a result, making this portion of the interface a little bit clunkier.
Thoughts? I could include mime in the public interface, or change the interface to return a result, making it less ergonomic.