示例#1
0
 def get(self, fn=None):
     if not fn:return
     v = self.get_argument('v', None)
     p=AvatarProcessor()
     kwargs = {}
     kwargs['version']=v
     self.write(p.display(fn, **kwargs))
示例#2
0
 def post(self):
     uid = self.SESSION['uid']
     p=AvatarProcessor(uid)
     f=self.request.files['upload'][0]
     r = p.process(f['body'])
     self.redirect('/image/upload?pid='+r)