class_docstr: Represents the source code directory and provide the utilities to manage it.
class_docstr_tok: ["Represents","the","source","code","directory","and","provide","the","utilities","to","manage","it","."]
docstr: Uploads package to URL, usually pre-signed UR.
  
  Notes
  -----
  Since we do not use multipart uploads here, we cannot upload any
  packaged repository files which have a size > 2GB.
  
  This limitation should be removed during the datastore upload redesign
docstr_tok: ["Uploads","package","to","URL",",","usually","pre-signed","UR",".","Notes","--","--","-","Since","we","do","not","use","multipart","uploads","here",",","we","can","not","upload","any","packaged","repository","files","which","have","a","size",">","2GB",".","This","limitation","should","be","removed","during","the","datastore","upload","redesign"]
code: def upload(self, url: str) -> None:
      """Uploads package to URL, usually pre-signed UR.
  
      Notes
      -----
      Since we do not use multipart uploads here, we cannot upload any
      packaged repository files which have a size > 2GB.
  
      This limitation should be removed during the datastore upload redesign
  
      """
      if self.package_path.stat().st_size > 2e9:
          raise OSError(
              "cannot upload directory code whose total fize size is greater than 2GB (2e9 bytes)"
          ) from None
  
      uploader = FileUploader(
          presigned_url=url,
          source_file=str(self.package_path),
          name=self.package_path.name,
          total_size=self.package_path.stat().st_size,
      )
      uploader.upload()
  
file_path: pytorch-lightning/src/lightning/app/source_code/local.py
imports: import os
  import uuid
  from contextlib import contextmanager
  from pathlib import Path
  from shutil import copytree, rmtree
  from typing import List, Optional
  from lightning.app.core.constants import DOT_IGNORE_FILENAME, SYS_CUSTOMIZATIONS_SYNC_PATH
  from lightning.app.source_code.copytree import _IGNORE_FUNCTION, _copytree
  from lightning.app.source_code.tar import _tar_path
  from lightning.app.source_code.uploader import FileUploader
label_desc: Use image node_id 8 for calling the LocalSourceCodeDir obj's underlying member method code with example usage: obj.upload(url) without return types