modifié: superTornado.py

This commit is contained in:
sidya82 2014-02-28 01:54:29 +01:00
parent 2745974996
commit eb6434e84e
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class VideoHandler(BaseHandler):
return return
name = tornado.escape.xhtml_escape(self.current_user) name = tornado.escape.xhtml_escape(self.current_user)
urlretrieve('http://test:a@192.168.1.15/image.jpg?cidx=791836195', 'image/temp.jpg') urlretrieve('http://test:a@192.168.1.15/image.jpg?cidx=791836195', 'image/temp.jpg')
self.render("video.html") self.write("video.html")
with open("image/temp.jpg", 'rb') as f: with open("image/temp.jpg", 'rb') as f:
data = f.read() data = f.read()
self.set_header('Content-type', 'image/jpg') self.set_header('Content-type', 'image/jpg')