Commit c1fdcfc2 authored by Gero Müller's avatar Gero Müller
Browse files

append filename to inline downloads

parent 0bb49907
...@@ -63,7 +63,9 @@ class FSController(AbstractController): ...@@ -63,7 +63,9 @@ class FSController(AbstractController):
if download and download.lower() in ['true', '1', 'yes']: if download and download.lower() in ['true', '1', 'yes']:
disposition = 'attachment; filename=%s' % path.split('/')[-1] disposition = 'attachment; filename=%s' % path.split('/')[-1]
headers['Content-Disposition'] = disposition else:
disposition = 'inline; filename=%s' % path.split('/')[-1]
headers['Content-Disposition'] = disposition
mimetype = fs.get_mime_type(path) mimetype = fs.get_mime_type(path)
if mimetype is not None: if mimetype is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment