docstr: Save the file to our store
  
  Args:
      name (str): with that name file will be available in sql api
      file_name (str): file name
      file_path (str): path to the file
  
  Returns:
      int: id of 'file' record in db
docstr_tok: ["Save","the","file","to","our","store","Args",":","name","(","str",")",":","with","that","name","file","will","be","available","in","sql","api","file_name","(","str",")",":","file","name","file_path","(","str",")",":","path","to","the","file","Returns",":","int",":","id","of","'file","'","record","in","db"]
code: def save_file(self, name, file_path, file_name=None):
      """Save the file to our store
  
      Args:
          name (str): with that name file will be available in sql api
          file_name (str): file name
          file_path (str): path to the file
  
      Returns:
          int: id of 'file' record in db
      """
      files_metadata = self.get_files()
      if name in [x["name"] for x in files_metadata]:
          raise Exception(f"File already exists: {name}")
  
      if file_name is None:
          file_name = Path(file_path).name
  
      file_dir = None
      try:
          df, _col_map = FileHandler._handle_source(file_path)
  
          ds_meta = {
              "row_count": len(df),
              "column_names": list(df.columns),
          }
  
          file_record = db.File(
              name=name,
              company_id=ctx.company_id,
              source_file_path=file_name,
              file_path="",
              row_count=ds_meta["row_count"],
              columns=ds_meta["column_names"],
          )
          db.session.add(file_record)
          db.session.commit()
          store_file_path = f"file_{ctx.company_id}_{file_record.id}"
          file_record.file_path = store_file_path
          db.session.commit()
  
          file_dir = Path(self.dir).joinpath(store_file_path)
          file_dir.mkdir(parents=True, exist_ok=True)
          source = file_dir.joinpath(file_name)
          # NOTE may be delay between db record exists and file is really in folder
          shutil.move(file_path, str(source))
  
          self.fs_store.put(store_file_path, base_dir=self.dir)
      except Exception as e:
          logger.error(e)
          raise
      finally:
          if file_dir is not None:
              shutil.rmtree(file_dir)
  
      return file_record.id
  
file_path: mindsdb/mindsdb/interfaces/file/file_controller.py
imports: import json
  import os
  import shutil
  from pathlib import Path
  from mindsdb.integrations.handlers.file_handler import Handler
  from mindsdb.interfaces.storage import db
  from mindsdb.interfaces.storage.fs import FsStore
  from mindsdb.utilities import log
  from mindsdb.utilities.config import Config
  from mindsdb.utilities.context import context
label_desc: Use image node_id 5 for calling the FileController obj's underlying member method code with example usage: obj.save_file(name, file_path, file_name) and returns: file_record