class_docstr: Implements the POST /upload_file endpoint.
class_docstr_tok: ["Implements","the","POST","\/upload_file","endpoint","."]
docstr: Parameters
  ----------
  file_mgr : UploadedFileManager
      The server's singleton UploadedFileManager. All file uploads
      go here.
  is_active_session:
      A function that returns true if a session_id belongs to an active
      session.
docstr_tok: ["Parameters","--","--","--","--","--","file_mgr",":","UploadedFileManager","The","server","'s","singleton","UploadedFileManager",".","All","file","uploads","go","here",".","is_active_session",":","A","function","that","returns","true","if","a","session_id","belongs","to","an","active","session","."]
code: def initialize(
      self,
      file_mgr: MemoryUploadedFileManager,
      is_active_session: Callable[[str], bool],
  ):
      """
      Parameters
      ----------
      file_mgr : UploadedFileManager
          The server's singleton UploadedFileManager. All file uploads
          go here.
      is_active_session:
          A function that returns true if a session_id belongs to an active
          session.
      """
      self._file_mgr = file_mgr
      self._is_active_session = is_active_session
  
file_path: streamlit/lib/streamlit/web/server/upload_file_request_handler.py
imports: from typing import Any, Callable, Dict, List
  import tornado.httputil
  import tornado.web
  from streamlit import config
  from streamlit.logger import get_logger
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager, UploadedFileRec
  from streamlit.web.server import routes, server_util
label_desc: Use image node_id 1 for calling the UploadFileRequestHandler obj's underlying member method code with example usage: obj.initialize(file_mgr, is_active_session) without return types