Skip to content

Commit

Permalink
Hint for positioning file pointer correctly before calling send_file().
Browse files Browse the repository at this point in the history
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
  • Loading branch information
birkenfeld authored and mitsuhiko committed Nov 8, 2010
1 parent 67f483b commit 858806d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
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.
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
Expand Down

0 comments on commit 858806d

Please sign in to comment.