fix task v2 download issue (#3220)

This commit is contained in:
LawyZheng
2025-08-18 14:24:18 +08:00
committed by GitHub
parent 35313508d0
commit 4617d2b5ca
10 changed files with 79 additions and 52 deletions

View File

@@ -790,7 +790,10 @@ async def handle_click_to_download_file_action(
skyvern_element = await dom.get_skyvern_element_by_id(action.element_id)
locator = skyvern_element.locator
download_dir = Path(get_download_dir(workflow_run_id=task.workflow_run_id, task_id=task.task_id))
context = skyvern_context.current()
download_dir = Path(
get_download_dir(run_id=context.run_id if context and context.run_id else task.workflow_run_id or task.task_id)
)
list_files_before = list_files_in_directory(download_dir)
LOG.info(
"Number of files in download directory before click",