-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 an Attachment type to axum-extra #2789
Conversation
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.
Thanks for the PR! A few small suggestions below.
CI failure seems unrelated, if you have an idea on how to fix it, a separate PR would be appreciated. Otherwise I'll try to find some time to fix it soon. |
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Thanks for your review and changes, I changed the code. I don't know why CI is failing if I have some time I'll try and fix it. |
I looked and the rustdoc failure is really just 2 spaces of indentation missing. Since I can't approve / merge my own PRs, do you mind just adding that to this? It's such a trivial change that I don't mind it being rolled up into another PR. |
Ofcourse! |
Okay, looks like there's more to it. Sorry, I'll go fix it myself in the next couple of days (and I hope David will be around to merge not too long after). |
Almost there, it's complaining about |
Sure, I suspect that there's more that should be done eventually, but to unblock CI that seems like the best solution. |
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
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.
Thank you!
Refs #2768
Motivation
When trying to send an attachment from Axum it includes,
Content-Disposition
header.Html
,Css
,JavaScript
orWasm
types or setting aContent-Type
header.I think this could be made a bit easier.
Solution
Add an
Attachment
response type to axum-extra. This type adds aContent-Disposition
header and optionally aContent-Type
header to the response.example: