''

def upload_file(self, source_path, dir_name):

    row = self.get_task_db(source_path)
    (source_dir, filename) = os.path.split(source_path)
    path = os.path.join(dir_name, filename)
    size = os.path.getsize(source_path)
    total_size = util.get_human_size(size)[0]
    tooltip = gutil.escape(_('From    {0}\nTo    {1}').format(source_path, path))
    if (size < (2 ** 27)):
        threshold = (2 ** 17)
    elif (size < (2 ** 29)):
        threshold = (2 ** 19)
    elif (size < (10 * (2 ** 30))):
        threshold = math.ceil((size / 1000))
    else:
        self.app.toast(_('{0}    is    too    large    to    upload    (>10G).').format(path))
        return
    task = [filename, source_path, path, size, 0, State.WAITING, StateNames[State.WAITING], '0    /    {0}'.format(total_size), 0, tooltip, threshold]
    row_id = self.add_task_db(task, force=False)
    task.insert(0, row_id)
    self.liststore.append(task)
