Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Georg Brandl · committed by Armin Ronacher · parent 67f483b · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:flask/helpers.py+3 added-1 removed
285 unmodified lines
286 relative to the :attr:`~Flask.root_path` if a287 relative path is specified.288 Alternatively a file object might be provided289 in which case `X-Sendfile` might not work and290 fall back to the traditional method.290 fall back to the traditional method. Make sure291 that the file pointer is positioned at the start292 of data to send before calling :func:`send_file`.293 :param mimetype: the mimetype of the file if provided, otherwise294 auto detection happens.295 :param as_attachment: set to `True` if you want to send this file with296 a ``Content-Disposition: attachment`` header.
194 unmodified lines