From 805692108ae973281d793250ca883cc1412ab08d Mon Sep 17 00:00:00 2001 From: Keyan Pishdadian Date: Mon, 9 Mar 2015 11:22:45 -0400 Subject: [PATCH] Update send_file() docs to clarify encoding requirement #1286 --- flask/helpers.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flask/helpers.py b/flask/helpers.py index 79839af7..8457baa2 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -445,14 +445,14 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False, .. versionchanged:: 0.9 cache_timeout pulls its default from application config, when None. - :param filename_or_fp: the filename of the file to send. This is - relative to the :attr:`~Flask.root_path` if a - relative path is specified. - Alternatively a file object might be provided - in which case ``X-Sendfile`` might not work and - fall back to the traditional method. Make sure - that the file pointer is positioned at the start - of data to send before calling :func:`send_file`. + :param filename_or_fp: the filename of the file to send in `latin-1`. + This is relative to the :attr:`~Flask.root_path` + if a relative path is specified. + Alternatively a file object might be provided in + which case ``X-Sendfile`` might not work and fall + back to the traditional method. Make sure that the + file pointer is positioned at the start of data to + send before calling :func:`send_file`. :param mimetype: the mimetype of the file if provided, otherwise auto detection happens. :param as_attachment: set to ``True`` if you want to send this file with