          request.META = {
              'HTTP_CONTENT_DISPOSITION': 'Content-Disposition: inline; filename=file.txt'.encode('utf-8'),
              'HTTP_CONTENT_LENGTH': 14,
          }
          self.parser_context = {'request': request}
  
      def test_parse(self):
          """ Make sure the `QueryDict` works OK """
          parser = FileUploadParser()
          data_and_files = parser.parse(self.stream, parser_context=self.parser_context)
 
</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 
        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         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]
        self.parser_context = {'request': request, 'kwargs': {}}
          request.META = {
              'HTTP_CONTENT_DISPOSITION': 'Content-Disposition: inline; filename=file.txt'.encode('utf-8'),
              'HTTP_CONTENT_LENGTH': 14,
          }
        self.parser_context = {'request': request, 'kwargs': {}}
  
      def test_parse(self):
          """ Make sure the `QueryDict` works OK """
          parser = FileUploadParser()
          data_and_files = parser.parse(self.stream, parser_context=self.parser_context)
keep keep keep keep replace keep 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/tests/parsers.py