1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-22 19:17:38 +00:00

Merge branch 'master' into Develop

This commit is contained in:
Ozzieisaacs
2020-02-17 18:42:53 +01:00
53 changed files with 2472 additions and 2478 deletions

View File

@@ -832,8 +832,8 @@ def get_download_link(book_id, book_format):
file_name = get_valid_filename(file_name)
headers = Headers()
headers["Content-Type"] = mimetypes.types_map.get('.' + book_format, "application/octet-stream")
headers["Content-Disposition"] = "attachment; filename*=UTF-8''%s.%s" % (quote(file_name.encode('utf-8')),
book_format)
headers["Content-Disposition"] = "attachment; filename=%s.%s; filename*=UTF-8''%s.%s" % (
quote(file_name.encode('utf-8')), book_format, quote(file_name.encode('utf-8')), book_format)
return do_download_file(book, book_format, data, headers)
else:
abort(404)