@tthrow
    @login_async
    @defer.inlineCallbacks
    def UploadToCapsule(self, archive, capsule, title, description, sandbox):
        docs = self.cache.get_adf(archive)
        docs['archive'].title = title
        docs['archive'].description = description
        status = self.cache.archive_status(archive, docs)
        if status != ttypes.ArchiveStatus.Local:
            raise ValueError("Archive state invalid")
        size = docs['archive'].meta.size
        cs = yield self.session.async_capsules()
        for c in cs:
            if c['id'] == int(capsule):
                if c.get('remaining', 0) >= docs['archive'].meta.size:
                    capsule = c
                    break
                else:
                    raise ValueError("Capsule is not big enough")
        else:
            raise ValueError("Capsule not found")

        state = UploadState.get(archive, size, capsule, sandbox)
        if state.exc is not None:
            raise ValueError("Archive has error")

        self._upload(archive, docs, state)
void UploadToCapsule(1: string ArchiveLocalID, 2: string CapsuleID,
dataset/ETHPy150Open longaccess/longaccess-client/lacli/server/__init__.py/LaServerCommand.UploadToCapsule