pass extra content-type values to file upload handlers
Currently, file upload handlers can only get the actual content type and charset, but App Engine's Blobstore file service passes a few extra vales to the content type which are needed to get the uploaded file's identifier ("blob-key"). Here's a sample snippet of an HTTP upload request's POST data:
Content-Type: message/external-body; blob-key="WEexn9L82wky30ADBOWqYA=="; access-type="X-AppEngine-BlobKey"
Content-Disposition: form-data; name="file"; filename="django-nonrel.diff"
content-disposition: form-data; name="file"; filename="django-nonrel.diff"
X-AppEngine-Upload-Creation: 2010-06-08 15:34:32.685000
The attached patch changes the file upload handling code such that it passes a dictionary with all extra content type arguments to the upload handler. With this I was able to successfully upload files to a model's FileField via a ModelForm.