nouveau fichier: image/temp.jpg
modifié: superTornado.py modifié: video.html
This commit is contained in:
parent
f5bfa5e53b
commit
d233f42973
BIN
image/temp.jpg
Normal file
BIN
image/temp.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -69,10 +69,19 @@ class UnauthorizedHandler(BaseHandler):
|
|||||||
self.redirect("/")
|
self.redirect("/")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class AJAXHandler(BaseHandler):
|
||||||
|
def get(self):
|
||||||
|
with open(path, 'rb') as f:
|
||||||
|
data = f.read()
|
||||||
|
self.write(data)
|
||||||
|
|
||||||
|
|
||||||
application = tornado.web.Application([
|
application = tornado.web.Application([
|
||||||
(r"/", MainHandler),
|
(r"/", MainHandler),
|
||||||
(r"/video", VideoHandler),
|
(r"/video", VideoHandler),
|
||||||
(r"/unauthorized", UnauthorizedHandler),
|
(r"/unauthorized", UnauthorizedHandler),
|
||||||
|
(r"/ajax", AJAXHandler),
|
||||||
], cookie_secret="1213215656")
|
], cookie_secret="1213215656")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -7,6 +7,5 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Vue camera</h2>
|
<h2>Vue camera</h2>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user