Skip to content

send_file: allow filename for inline content-disposition  #1869

@ThiefMaster

Description

@ThiefMaster

send_file should support attachment_filename even for content-disposition inline.

Including a filename with inline files makes perfect sense e.g. when serving images users may want to "rightclick -> save as".
To avoid breaking API changes I would recommend keeping attachment_filename for it, but sending a content-disposition:inline header in case as_attachment is false. Alternatively we could deprecate attachment_filename in favor of a new client_filename, where the old kwarg would not add an inline disposition while the new one would.

This depends on #1850 since it moves send_file from Flask to werkzeug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions