fix: not able to download XML file
This commit is contained in:
parent
2743863407
commit
80f87a37fb
1 changed files with 1 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ def send_private_file(path):
|
|||
blacklist = ['.svg', '.html', '.htm', '.xml']
|
||||
|
||||
if extension.lower() in blacklist:
|
||||
response.headers.add(b'Content-Disposition', b'attachment', filename=filename.encode("utf-8"))
|
||||
response.headers.add('Content-Disposition', 'attachment', filename=filename.encode("utf-8"))
|
||||
|
||||
response.mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue