-
Notifications
You must be signed in to change notification settings - Fork 8.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
Extend context.File to allow for the content-dispositon attachments via a new method context.Attachment #1260
Conversation
Failure has nothing to do with the PR. Some bad gateway in the vendoring. Could someone trigger a rebuild / look into the bad gateway? |
similar #1304 , it's ok, LGTM |
Codecov Report
@@ Coverage Diff @@
## master #1260 +/- ##
=========================================
+ Coverage 98.5% 98.5% +<.01%
=========================================
Files 41 41
Lines 2070 2073 +3
=========================================
+ Hits 2039 2042 +3
Misses 19 19
Partials 12 12
Continue to review full report at Codecov.
|
@appleboy please help to review the pull request, thanks! |
Before the implementation. I just use the following code.
|
Extends the
context.File
method to allow the Content-Disposition header to be automatically set within this scope. This allows downloads of the file as attachments, allowing the server to specify the filename.References:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
Resolves #1243