]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
nopaste: Send filename of uploaded files in the header
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jun 2015 14:22:53 +0000 (16:22 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jun 2015 14:22:53 +0000 (16:22 +0200)
webapp/handlers_nopaste.py

index a3c274c0840ae4f3956350a9f7920a474b736bf3..6c2b75b011a76b5512cc7fd2ba47aa848d9cdb77 100644 (file)
@@ -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)