forked from orbit-oss/flask
Do not error for unknown files if send_file sends an actual file
This commit is contained in:
parent
c54c538c11
commit
a30951ec28
2 changed files with 3 additions and 4 deletions
|
|
@ -513,7 +513,8 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
|
|||
|
||||
if mimetype is None:
|
||||
if attachment_filename is not None:
|
||||
mimetype = mimetypes.guess_type(attachment_filename)[0]
|
||||
mimetype = mimetypes.guess_type(attachment_filename)[0] \
|
||||
or 'application/octet-stream'
|
||||
|
||||
if mimetype is None:
|
||||
if attachment_filename is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue