Hint for positioning file pointer correctly before calling send_file().

This commit is contained in:
Georg Brandl 2010-11-08 18:02:39 +01:00
parent d07b055d7a
commit 6d8a1fa488

View file

@ -279,7 +279,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