fix frontend bug
This commit is contained in:
1 parent
a18f7a5c8b
commit
9bb46f7004
10 files changed
+83
-21
No files matched your search
@@ -14,8 +14,12 @@ def artifact_path(pipeline: str, task_id: str, name: str) -> str:
|
||||
return f"{pipeline}/{task_id}/{name}"
|
||||
|
||||
|
||||
async def store_bytes(pipeline: str, task_id: str, name: str, data: bytes) -> str:
|
||||
return await blob.upload_bytes(data, artifact_path(pipeline, task_id, name))
|
||||
async def store_bytes(pipeline: str, task_id: str, name: str, data: bytes, *,
|
||||
download_as: str | None = None) -> str:
|
||||
"""download_as를 주면 브라우저가 그 주소를 열 때 그 이름으로 내려받는다"""
|
||||
return await blob.upload_bytes(
|
||||
data, artifact_path(pipeline, task_id, name),
|
||||
disposition=blob.as_attachment(download_as) if download_as else None)
|
||||
|
||||
|
||||
async def store_image(pipeline: str, task_id: str, name: str, image: Image.Image) -> str:
|
||||
|
||||
Reference in new issue
Block a user