code: def uploadFile(self, endpoint, token, filename, name):
      size = os.path.getsize(filename)
      if endpoint == "https://console-api.dl.sony.com":
          self._log("Getting Upload path")
      else:
          self._log("Getting Upload path from [{}]".format(endpoint))
  
      params = urllib.parse.urlencode(
          {
              "encrypted_text": token,
              "dataset_name": name,
              "dataset_size": size,
          }
      )
      r = request.urlopen(f"{endpoint}/v1/misc/credential?{params}")
      info = json.loads(r.read().decode())
  
      if "upload_path" not in info:
          if endpoint == "https://console-api.dl.sony.com":
              self._log(
                  "Upload_path could not be retrieved from the server."
              )
          else:
              self._log("Server returns [{}]".format(info["message"]))
          return False
  
      upload_url = info["upload_path"]
      if endpoint == "https://console-api.dl.sony.com":
          self._log("Got upload_url")
      else:
          self._log("upload_url is [{}]".format(upload_url))
  
      bucketname, key = upload_url.split("://", 1)[1].split("/", 1)
      upload_key = "{}/{}.tar".format(key, name)
  
      s3 = boto3.session.Session(
          aws_access_key_id=info["access_key_id"],
          aws_secret_access_key=info["secret_access_key"],
          aws_session_token=info["session_token"],
      ).client("s3")
      tc = boto3.s3.transfer.TransferConfig(
          multipart_threshold=10 * 1024 * 1024, max_concurrency=10
      )
      t = boto3.s3.transfer.S3Transfer(client=s3, config=tc)
  
      self._progress.init(os.path.getsize(filename), "Upload")
      t.upload_file(
          filename, bucketname, upload_key, callback=self._progress
      )
      self._progress.finish()
  
      return True
  
imports: import boto3
  import csv
  import json
  import os
  import urllib.parse
  import urllib.request
  import shutil
  import tarfile
  import tempfile
  import threading
  import tqdm
label_desc: Use image node_id 3 for calling the Uploader obj's underlying member method code with example usage: obj.uploadFile(endpoint, token, filename, name) and returns: True, False