tomchristie/django-rest-framework — pull request #806 by wronglink (2013-05-02 19:52:54+00:00)
Title: Added FileUploadParser

I've implemented a `FileUploadParser` to handle files from request body as it was described in #7. Most of work was already done in django's `MultiPartParser` so I remove the redundant parts and tired to make the code a little bit cleaner.

A typical usage should look like:

```python
from rest_framework import views
from rest_framework.parsers import FileUploadParser
from rest_framework.response import Response

class TestUpload(views.APIView):
parser_classes = (FileUploadParser,)

def put(self, request, file, format=None):
file_obj = request.FILES['file']
# ...
# do some staff with uploaded file
# ...
return Response(status=204)
```

Still not sure, if `HTTP_CONTENT_DISPOSITION` header support is enough for filename handing. Maybe I should first try to get filename from `parser_context`?