def write(self, data):
        """writes some data to the file."""
        if self.closed:
            raise ValueError("I/O operation on closed file")
        if self.session is None:
            # first call
            self.session = self.client.files_upload_session_start(
                data,
                close=False,
            )
            self.cursor = dropbox.files.UploadSessionCursor(self.session.session_id, offset=0)
        else:
            self.client.files_upload_session_append_v2(data, self.cursor, close=False)
        self.cursor.offset += len(data)
writes some data to the file.
lib/stashutils/fsi/DropBox.py