don't mark images with disposition: attachment

This commit is contained in:
Frédéric Péters 2007-10-18 14:32:20 +00:00
parent 10e5c74eba
commit a7dfae66b8
1 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,11 @@ def form_attachment(self):
if p.charset:
response.set_charset(p.charset)
if p.base_filename:
response.set_header(
if p.content_type and p.content_type.startswith('image/'):
response.set_header(
'content-disposition', 'inline; filename="%s"' % p.base_filename)
else:
response.set_header(
'content-disposition', 'attachment; filename="%s"' % p.base_filename)
return content