parameters: (entity)
docstring: Read all multipart/form-data parts into entity.parts or entity.params.
docstring_summary: Read all multipart/form-data parts into entity.parts or entity.params.
docstring_tokens: Read all multipart / form - data parts into entity . parts or entity . params .
function: def process_multipart_form_data(entity):
      """Read all multipart/form-data parts into entity.parts or entity.params.
      """
      process_multipart(entity)
  
      kept_parts = []
      for part in entity.parts:
          if part.name is None:
              kept_parts.append(part)
          else:
              if part.filename is None:
                  # It's a regular field
                  value = part.fullvalue()
              else:
                  # It's a file upload. Retain the whole part so consumer code
                  # has access to its .file and .filename attributes.
                  value = part
  
              if part.name in entity.params:
                  if not isinstance(entity.params[part.name], list):
                      entity.params[part.name] = [entity.params[part.name]]
                  entity.params[part.name].append(value)
              else:
                  entity.params[part.name] = value
  
      entity.parts = kept_parts
function_tokens: def process_multipart_form_data ( entity ) : process_multipart ( entity ) kept_parts = [ ] for part in entity . parts : if part . name is None : kept_parts . append ( part ) else : if part . filename is None : # It's a regular field value = part . fullvalue ( ) else : # It's a file upload. Retain the whole part so consumer code # has access to its .file and .filename attributes. value = part if part . name in entity . params : if not isinstance ( entity . params [ part . name ] , list ) : entity . params [ part . name ] = [ entity . params [ part . name ] ] entity . params [ part . name ] . append ( value ) else : entity . params [ part . name ] = value entity . parts = kept_parts