'Gets the next block of data to be uploaded. This method is only used for data uploading.
:return The data to transfer.'

def _get_next_data(self, session):

    start_idx = (session.block_number * session.block_size)
    end_idx = (start_idx + session.block_size)
    data = session.file_data[start_idx:end_idx]
    session.block_number += 1
    if (len(data) < session.block_size):
        session.is_waiting_for_last_ack = True
    return data
