class_docstr: RPC Client session module
  
  Do not directly create the object, call connect
class_docstr_tok: ["RPC","Client","session","module","Do","not","directly","create","the","object",",","call","connect"]
docstr: Upload file to remote runtime temp folder
  
  Parameters
  ----------
  data : str or bytearray
      The file name or binary in local to upload.
  
  target : str, optional
      The path in remote
docstr_tok: ["Upload","file","to","remote","runtime","temp","folder","Parameters","--","--","--","--","--","data",":","str","or","bytearray","The","file","name","or","binary","in","local","to","upload",".","target",":","str",",","optional","The","path","in","remote"]
code: def upload(self, data, target=None):
      """Upload file to remote runtime temp folder
  
      Parameters
      ----------
      data : str or bytearray
          The file name or binary in local to upload.
  
      target : str, optional
          The path in remote
      """
      if isinstance(data, bytearray):
          if not target:
              raise ValueError(
                  "target must present when file is a bytearray"
              )
          blob = data
      else:
          blob = bytearray(open(data, "rb").read())
          if not target:
              target = os.path.basename(data)
  
      if "upload" not in self._remote_funcs:
          self._remote_funcs["upload"] = self.get_function(
              "tvm.rpc.server.upload"
          )
      self._remote_funcs["upload"](target, blob)
  
imports: import os
  import socket
  import stat
  import struct
  import time
  import tvm._ffi
  from tvm._ffi.base import TVMError
  from tvm.contrib import utils
  from tvm.runtime import ndarray
  from tvm._ffi.runtime_ctypes import Device
  from .None import _ffi_api, base, server
label_desc: Use image node_id 5 for calling the RPCSession obj's underlying member method code with example usage: obj.upload(data, target) without return types