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))
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)