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
send_file calls max_age with Path instead of str #2119
Comments
You'll need to call |
Then should the documentation be updated to note it's now a Path object and not a string: https://flask.palletsprojects.com/en/2.0.x/api/#flask.Flask.get_send_file_max_age
|
Note that your implementation already has an issue, as |
Good spot on the BTW I was happy to leave as Thanks for the quick response btw! |
We use the following code to override the
SEND_FILE_MAX_AGE_DEFAULT
for certain file types:As of the newly released Flask 2.0 this is failing with the following error:
So we have to change this to this to convert the name to a string:
Is this an intended behaviour change as the documentation still says this uses a string as an argument rather than a PosixPath?
Environment:
The text was updated successfully, but these errors were encountered: