def upload(self, files: Sequence[str]):
rqst = Request('POST', '/kernel/{}/upload'.format(self.kernel_id))
rqst.content = [
# name filename file content_type headers
aiohttp.web.FileField(
'src', path, open(path, 'rb'), 'application/octet-stream', None
) for path in files
]
return (await rqst.asend())
# only supported in AsyncKernel
评论列表
文章目录