  
      def parse(self, stream, media_type=None, parser_context=None):
          parser_context = parser_context or {}
          request = parser_context['request']
          encoding = parser_context.get('encoding', settings.DEFAULT_CHARSET)
          meta = request.META
 
</s> remove 
        try:
            disposition = parse_header(meta['HTTP_CONTENT_DISPOSITION'])
            filename = disposition[1]['filename']
        except KeyError:
            filename = None
 </s> add         upload_handlers = request.upload_handlers
        filename = self.get_filename(stream, media_type, parser_context) </s> remove         self.parser_context = {'request': request}
 </s> add         self.parser_context = {'request': request, 'kwargs': {}} </s> remove         data_and_files = parser.parse(self.stream, parser_context=self.parser_context)
 </s> add         self.stream.seek(0)
        data_and_files = parser.parse(self.stream, None, self.parser_context) </s> remove         counters = [0] * len(request.upload_handlers)
 </s> add         counters = [0] * len(upload_handlers) </s> remove         possible_sizes = [x.chunk_size for x in request.upload_handlers if x.chunk_size]
 </s> add         possible_sizes = [x.chunk_size for x in upload_handlers if x.chunk_size]
        """
        Returns a DataAndFiles object.

        `.data` will be None (we expect request body to be a file content).
        `.files` will be a `QueryDict` containing one 'file' elemnt - a parsed file.
        """

  
      def parse(self, stream, media_type=None, parser_context=None):
        """
        Returns a DataAndFiles object.

        `.data` will be None (we expect request body to be a file content).
        `.files` will be a `QueryDict` containing one 'file' elemnt - a parsed file.
        """

          parser_context = parser_context or {}
          request = parser_context['request']
          encoding = parser_context.get('encoding', settings.DEFAULT_CHARSET)
          meta = request.META
keep add keep keep keep keep
 Codebase improvements on FileUploadParser

* Added docstrings.
* Added `FileUploadParser.get_filename` to make it easier to override.
* Added url kwargs filename detection step.
* Updated tests corresponding to these changes. 
rest_framework/parsers.py