docstr: This component uploads, downloads files to your application.
  
  Arguments:
      drive: The drive can share data inside your application.
      base_dir: The local directory where the data will be stored.
      chunk_size: The quantity of bytes to download/upload at once.
docstr_tok: ["This","component","uploads",",","downloads","files","to","your","application",".","Arguments",":","drive",":","The","drive","can","share","data","inside","your","application",".","base_dir",":","The","local","directory","where","the","data","will","be","stored",".","chunk_size",":","The","quantity","of","bytes","to","download\/upload","at","once","."]
code: def __init__(
      self,
      drive: Drive,
      base_dir: str = "file_server",
      chunk_size=10240,
      **kwargs,
  ):
      """This component uploads, downloads files to your application.
  
      Arguments:
          drive: The drive can share data inside your application.
          base_dir: The local directory where the data will be stored.
          chunk_size: The quantity of bytes to download/upload at once.
  
      """
      super().__init__(
          cloud_build_config=BuildConfig(["flask, flask-cors"]),
          parallel=True,
          **kwargs,
      )
      # 1: Attach the arguments to the state.
      self.drive = drive
      self.base_dir = base_dir
      self.chunk_size = chunk_size
  
      # 2: Create a folder to store the data.
      os.makedirs(self.base_dir, exist_ok=True)
  
      # 3: Keep a reference to the uploaded filenames.
      self.uploaded_files = dict()
  
imports: import json
  import os
  import tarfile
  import uuid
  import zipfile
  from pathlib import Path
  from lightning.app import LightningWork, LightningApp
  from lightning.app.storage import Drive
  import requests
  from lightning import LightningWork
  from lightning import LightningApp, LightningFlow
  from lightning.app.runners import MultiProcessRuntime
  from lightning.app.testing import run_app_in_cloud
label_desc: Use image node_id 1 to create a new FileServer object from inherited base classes: LightningWork with example: obj = FileServer(drive, base_dir, chunk_size)