class UploadHandler(BaseHandler):

    def post(self):
        attachments = self.request.POST.getall('attachments')
_attachments = [{'content': f.file.read(), 'filename': f.filename} for f in
    attachments]
How to handle uploaded files in webapp2