def post(self, *args, **kwargs):
        args = self.get_flat_arguments()
        args['files'] = {}
        for file in self.request.files:
            if len(self.request.files[file]) > 1:
                for content in self.request.files[file]:
                    args['files'][file] = {
                        'content': '%s;%s,%s' % (content['content_type'], 'base64', base64.b64encode(content['body'])),
                        'name': smart_unicode(content['filename'])
                    }
            else:
                content = self.request.files[file][0]
                args['files'][file] = {
                    'content': '%s;%s,%s' % (content['content_type'], 'base64', base64.b64encode(content['body'])),
                    'name': smart_unicode(content['filename'])
                }
        self.write(json_encode(args))
        self.finish()
dataset/ETHPy150Open letolab/airy/airy/core/web.py/FormProcessor.post/original