Add content disposition type parameter to FileResponse#1266
Merged
lovelydinosaur merged 2 commits intoKludex:masterfrom Feb 14, 2022
Merged
Add content disposition type parameter to FileResponse#1266lovelydinosaur merged 2 commits intoKludex:masterfrom
lovelydinosaur merged 2 commits intoKludex:masterfrom
Conversation
Contributor
Author
|
Friendly ping. |
Kludex
reviewed
Sep 16, 2021
Owner
Kludex
left a comment
There was a problem hiding this comment.
Documentation needs to be updated on this PR as well.
| filename: str = None, | ||
| stat_result: os.stat_result = None, | ||
| method: str = None, | ||
| content_disposition_type: str = "attachment", |
Owner
There was a problem hiding this comment.
Only "inline" and "attachment" are allowed here, right?
Owner
|
Flask 2.0 adds this possibility as well. |
disposition "attachment" causes browsers to download the file. E.g. "inline" will will be attempted to be displayed directly.
Contributor
Author
|
I added the parameter description to the docs. There are a couple other parameters missing there but it's outside of the scope of the pull request, just FYI. |
lovelydinosaur
approved these changes
Feb 14, 2022
lovelydinosaur
left a comment
There was a problem hiding this comment.
I'm pretty okay with this yup.
It's a nice low-footprint change, so no big objections.
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.
disposition "attachment" causes browsers to download
the file. E.g. "inline" will will be attempted to be
displayed directly.