My basic question is this: Is there an equivalent of
form = MyForm(request.POST, request.FILES)
when handling file uploads using the webapp
framework on Google App Engine?
I know that I can pull out specific uploaded file data using self.request.get('field_name')
or a FieldStorage object using self.request.params['field_name']
, but in my case I do not know the field names in advance. I would like to let the form object take care of pulling the data it needs out of the request (especially since the forms, and thus the incoming field names, have prefixes).
I'm porting a sort of generic CMS system from Django (already running on App Engine) to Google's webapp framework, and this is the last major stumbling block. When a new item is created, I'd like to be able to just pass the POSTed parameters and files straight to the Django form object for that item, so that I don't have to know ahead of time what fields are in the form and which of those fields are file uploads. This was possible using Django, but I can't see any easy way to do it in the webapp framework.