Allow passing additional `send_file` options to `app.send_static_file` #292

Closed
wants to merge 1 commit into
from

Conversation

2 participants
Contributor

jab commented Aug 4, 2011

Hi Armin, I'm implementing a send_static_file_versioned view (which gets urls like /vstatic/<versionstamp>/<path>) and I would like it to just return app.send_static_file(filename, cache_timeout=HUGE) but that function does not currently accept the additional options that flask.helpers.send_file accepts. I believe this patch would accomplish what I'm looking for. Would it make sense to merge back into flask?

Owner

mitsuhiko commented Aug 4, 2011

Since send_static_file is a view function/method I don't think it makes sense to forward arbitrary keyword arguments there. If you want to customize it, override it in a subclass or bypass that function directly.

@mitsuhiko mitsuhiko closed this Aug 4, 2011

Contributor

jab commented Aug 4, 2011

works for me, thanks Armin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment