forked from orbit-oss/flask
Fix error in send_file helper (#2003)
* Fix error in send_file (mimetype_filename is not defined) * fix formatting error message in send_file
This commit is contained in:
parent
96b6345c1a
commit
92ce20eeac
2 changed files with 7 additions and 3 deletions
|
|
@ -518,8 +518,8 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
|
|||
if mimetype is None:
|
||||
if attachment_filename is not None:
|
||||
raise ValueError(
|
||||
'Unable to infer MIME-type from filename {!r}, please '
|
||||
'pass one explicitly.'.format(mimetype_filename)
|
||||
'Unable to infer MIME-type from filename {0!r}, please '
|
||||
'pass one explicitly.'.format(attachment_filename)
|
||||
)
|
||||
raise ValueError(
|
||||
'Unable to infer MIME-type because no filename is available. '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue