Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move send_file and send_from_directory to Werkzeug #3828

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Conversation

davidism
Copy link
Member

@davidism davidism commented Nov 5, 2020

The implementations were moved to Werkzeug (pallets/werkzeug#1850, pallets/werkzeug#1962). Flask's functions become wrappers around Werkzeug to pass some Flask-specific values.

cache_timeout is renamed to max_age. SEND_FILE_MAX_AGE_DEFAULT, app.send_file_max_age_default, and app.get_send_file_max_age defaults to None. This tells the browser to use conditional requests rather than a 12 hour cache. (pallets/werkzeug#1886)

attachment_filename is renamed to download_name, and is always sent if a name is known. (pallets/werkzeug#1884)

Deprecate helpers.safe_join in favor of werkzeug.utils.safe_join.

Removed most of the tests, they're tested in Werkzeug.

In the file upload example, renamed the uploaded_file view to download_file to avoid a common source of confusion.

@davidism davidism added this to the 2.0.0 milestone Nov 5, 2020
The implementations were moved to Werkzeug, Flask's functions become
wrappers around Werkzeug to pass some Flask-specific values.

cache_timeout is renamed to max_age. SEND_FILE_MAX_AGE_DEFAULT,
app.send_file_max_age_default, and app.get_send_file_max_age defaults
to None. This tells the browser to use conditional requests rather than
a 12 hour cache.

attachment_filename is renamed to download_name, and is always sent if
a name is known.

Deprecate helpers.safe_join in favor of werkzeug.utils.safe_join.

Removed most of the send_file tests, they're tested in Werkzeug.

In the file upload example, renamed the uploaded_file view to
download_file to avoid a common source of confusion.
@davidism davidism merged commit bbb273b into master Nov 5, 2020
@davidism davidism deleted the move-send-file branch November 5, 2020 17:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant