From: Michael Tremer Date: Tue, 9 Jun 2015 14:22:53 +0000 (+0200) Subject: nopaste: Send filename of uploaded files in the header X-Git-Url: http://git.ipfire.org/?p=people%2Fshoehn%2Fipfire.org.git;a=commitdiff_plain;h=6f3eb7f98856248667220a32e8b177521074f1ef;hp=c6ba694941fb222c7d7bee96e87748621b80873c nopaste: Send filename of uploaded files in the header --- diff --git a/webapp/handlers_nopaste.py b/webapp/handlers_nopaste.py index a3c274c..6c2b75b 100644 --- a/webapp/handlers_nopaste.py +++ b/webapp/handlers_nopaste.py @@ -69,6 +69,9 @@ class NopasteRawHandler(BaseHandler): if not entry: raise tornado.web.HTTPError(404) + # Set the filename + self.set_header("Content-Disposition", "inline; filename=\"%s\"" % entry.subject) + # Set mimetype self.set_header("Content-Type", entry.mimetype)