class Rack::Multipart::Parser::Collector

def on_mime_head(mime_index, head, filename, content_type, name)

def on_mime_head(mime_index, head, filename, content_type, name)
  if filename
    body = @tempfile.call(filename, content_type)
    body.binmode if body.respond_to?(:binmode)
    klass = TempfilePart
    @open_files += 1
  else
    body = String.new
    klass = BufferPart
  end
  @mime_parts[mime_index] = klass.new(body, head, filename, content_type, name)
  check_part_limits
end