modifié: superTornado.py
modifié: video.html
This commit is contained in:
parent
3a0047756a
commit
9059bd186b
@ -50,8 +50,6 @@ class VideoHandler(BaseHandler):
|
|||||||
if not self.current_user :
|
if not self.current_user :
|
||||||
self.redirect("/")
|
self.redirect("/")
|
||||||
return
|
return
|
||||||
name = tornado.escape.xhtml_escape(self.current_user)
|
|
||||||
urlretrieve('http://test:a@192.168.1.15/image.jpg?cidx=791836195', 'image/temp.jpg')
|
|
||||||
self.render("video.html")
|
self.render("video.html")
|
||||||
|
|
||||||
|
|
||||||
@ -77,6 +75,7 @@ class UnauthorizedHandler(BaseHandler):
|
|||||||
|
|
||||||
class AJAXHandler(BaseHandler):
|
class AJAXHandler(BaseHandler):
|
||||||
def post(self):
|
def post(self):
|
||||||
|
urlretrieve('http://test:a@192.168.1.15/image.jpg?cidx=791836195', 'image/temp.jpg')
|
||||||
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/jpeg')
|
#self.set_header('Content-type', 'image/jpeg')
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
$(document).ready(refresh())
|
$(document).ready(refresh())
|
||||||
setInterval('refresh()', 3000);
|
setInterval('refresh()', 2000);
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user