code: def is_upload(action):
      
      return 'r' in action.type._mode and (action.default is None or
                                           getattr(action.default, 'name') not in (sys.stderr.name, sys.stdout.name))
docs: Checks if this should be a user upload
  
      :param action:
      :return: True if this is a file we intend to upload from the user