Skip to content

Why static filename extension "htm" won't parse but instead of downloaded #240

Answered by miguelgrinberg
kenjican asked this question in Q&A
Discussion options

You must be logged in to vote

The send_file() function does not recognize the htm extension, so it does not assign the correct content type to it. Try either using .html, or else giving the function an explicit content type:

send_file('file.htm", content_type="text/html")

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@kenjican
Comment options

@kenjican
Comment options

Comment options

You must be logged in to vote
1 reply
@kenjican
Comment options

Answer selected by kenjican
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants