class_docstr: Used to create an upload button, when clicked allows a user to upload files that satisfy the specified file type or generic files (if file_type not set).
  Preprocessing: passes the uploaded file as a {file-object} or {List[file-object]} depending on `file_count` (or a {bytes}/{List[bytes]} depending on `type`)
  Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files.
  Examples-format: a {str} path to a local file that populates the component.
  Demos: upload_button
class_docstr_tok: ["Used","to","create","an","upload","button",",","when","clicked","allows","a","user","to","upload","files","that","satisfy","the","specified","file","type","or","generic","files","(","if","file_type","not","set",")",".","Preprocessing",":","passes","the","uploaded","file","as","a","{","file-object","}","or","{","List","[","file-object","]","}","depending","on","`","file_count","`","(","or","a","{","bytes","}","\/","{","List","[","bytes","]","}","depending","on","`","type","`",")","Postprocessing",":","expects","function","to","return","a","{","str","}","path","to","a","file",",","or","{","List","[","str","]","}","consisting","of","paths","to","files",".","Examples-format",":","a","{","str","}","path","to","a","local","file","that","populates","the","component",".","Demos",":","upload_button"]
code: def postprocess(
      self, value: str | list[str] | None
  ) -> ListFiles | FileData | None:
      if value is None:
          return None
      if isinstance(value, list):
          return ListFiles(
              root=[
                  FileData(
                      path=file,
                      orig_name=Path(file).name,
                      size=Path(file).stat().st_size,
                  )
                  for file in value
              ]
          )
      else:
          return FileData(
              path=value,
              orig_name=Path(value).name,
              size=Path(value).stat().st_size,
          )
  
file_path: gradio/gradio/components/upload_button.py
imports: from __future__ import annotations
  import tempfile
  import warnings
  from pathlib import Path
  from typing import Any, Callable, Literal
  from gradio_client.documentation import document, set_documentation_group
  from gradio.components.base import Component
  from gradio.data_classes import FileData, ListFiles
  from gradio.events import Events
  from gradio.utils import NamedString
label_desc: Use image node_id 6 for calling the UploadButton obj's underlying member method code with example usage: obj.postprocess(value) and returns: None, ListFiles, FileData