Skip to content
Myr

Update send_file() docs to clarify encoding requirement #1286

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

authored by Keyan Pishdadian · committed by Markus Unterwaditzer · parent d13a1b3 · Browse files · 1 file+8 added−8 removed
This commit

State

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

Diff stats

1 file+8 added−8 removed

  • other:+8 added−8 removed

1 file+8 added−8 removed

modified:flask/helpers.py+8 added-8 removed
443 unmodified lines
444445 .. versionchanged:: 0.9446 cache_timeout pulls its default from application config, when None.447448 :param filename_or_fp: the filename of the file to send. This is449 relative to the :attr:`~Flask.root_path` if a450 relative path is specified.451 Alternatively a file object might be provided452 in which case ``X-Sendfile`` might not work and453 fall back to the traditional method. Make sure454 that the file pointer is positioned at the start455 of data to send before calling :func:`send_file`.448 :param filename_or_fp: the filename of the file to send in `latin-1`.449 This is relative to the :attr:`~Flask.root_path`450 if a relative path is specified.451 Alternatively a file object might be provided in452 which case ``X-Sendfile`` might not work and fall453 back to the traditional method. Make sure that the454 file pointer is positioned at the start of data to455 send before calling :func:`send_file`.456 :param mimetype: the mimetype of the file if provided, otherwise457 auto detection happens.458 :param as_attachment: set to ``True`` if you want to send this file with459 a ``Content-Disposition: attachment`` header.
439 unmodified lines