Beispiel #1
0
 def get(self, fn=None):
     if not fn:return
     v = self.get_argument('v', None)
     p=AttachProcessor()
     kwargs = {}
     kwargs['version']=v
     self.write(p.display(fn, **kwargs))
Beispiel #2
0
 def post(self):
     #uid = self.SESSION['uid']
     uid = self.get_argument('uid', None)
     p=AttachProcessor()
     f = self.request.files['upload'][0]
     r = p.process(f['body'])
     return self.write(r)
Beispiel #3
0
 def post(self):
     uid = self.get_argument('uid', None)
     aid = self.get_argument('aid', None)
     p=AttachProcessor()
     f = self.request.files['upload'][0]
     r = p.process(f['body'])
     a = Album()
     ra = a._api.push(aid, r)
     return self.write(r)
Beispiel #4
0
 def post(self):
     uid = self.SESSION['uid']
     pid = self.get_argument('pid', None)
     p=AttachProcessor()
     r = p.remove(pid)
     return self.write({'ret':'ok'})