docstr: Load the given file path or bytes into the manager and return
  an ID that uniquely identifies it.
  
  It’s an error to pass a URL to this function. (Media stored at
  external URLs can be served directly to the Streamlit frontend;
  there’s no need to store this data in MediaFileStorage.)
  
  Parameters
  ----------
  path_or_data
      A path to a file, or the file's raw data as bytes.
  
  mimetype
      The media’s mimetype. Used to set the Content-Type header when
      serving the media over HTTP.
  
  kind
      The kind of file this is: either MEDIA, or DOWNLOADABLE.
  
  filename : str or None
      Optional filename. Used to set the filename in the response header.
  
  Returns
  -------
  str
      The unique ID of the media file.
  
  Raises
  ------
  MediaFileStorageError
      Raised if the media can't be loaded (for example, if a file
      path is invalid).
docstr_tok: ["Load","the","given","file","path","or","bytes","into","the","manager","and","return","an","ID","that","uniquely","identifies","it",".","It","\u2019","s","an","error","to","pass","a","URL","to","this","function",".","(","Media","stored","at","external","URLs","can","be","served","directly","to","the","Streamlit","frontend",";","there","\u2019","s","no","need","to","store","this","data","in","MediaFileStorage",".",")","Parameters","--","--","--","--","--","path_or_data","A","path","to","a","file",",","or","the","file","'s","raw","data","as","bytes",".","mimetype","The","media","\u2019","s","mimetype",".","Used","to","set","the","Content-Type","header","when","serving","the","media","over","HTTP",".","kind","The","kind","of","file","this","is",":","either","MEDIA",",","or","DOWNLOADABLE",".","filename",":","str","or","None","Optional","filename",".","Used","to","set","the","filename","in","the","response","header",".","Returns","--","--","--","-","str","The","unique","ID","of","the","media","file",".","Raises","--","--","--","MediaFileStorageError","Raised","if","the","media","ca","n't","be","loaded","(","for","example",",","if","a","file","path","is","invalid",")","."]
code: def load_and_get_id(
      self,
      path_or_data: Union[str, bytes],
      mimetype: str,
      kind: MediaFileKind,
      filename: Optional[str] = None,
  ) -> str:
      """Load the given file path or bytes into the manager and return
      an ID that uniquely identifies it.
  
      It’s an error to pass a URL to this function. (Media stored at
      external URLs can be served directly to the Streamlit frontend;
      there’s no need to store this data in MediaFileStorage.)
  
      Parameters
      ----------
      path_or_data
          A path to a file, or the file's raw data as bytes.
  
      mimetype
          The media’s mimetype. Used to set the Content-Type header when
          serving the media over HTTP.
  
      kind
          The kind of file this is: either MEDIA, or DOWNLOADABLE.
  
      filename : str or None
          Optional filename. Used to set the filename in the response header.
  
      Returns
      -------
      str
          The unique ID of the media file.
  
      Raises
      ------
      MediaFileStorageError
          Raised if the media can't be loaded (for example, if a file
          path is invalid).
  
      """
      raise NotImplementedError
  
file_path: streamlit/lib/streamlit/runtime/media_file_storage.py
imports: from abc import abstractmethod
  from enum import Enum
  from typing import Optional, Union
  from typing_extensions import Protocol
label_desc: Use image node_id 1 for calling the MediaFileStorage obj's underlying member method code with example usage: obj.load_and_get_id(path_or_data, mimetype, kind, filename) without return types