From dcd79df9fbf8b5f5e96531b0ef853219f4e21d7e Mon Sep 17 00:00:00 2001 From: yyh Date: Fri, 23 Jan 2026 16:13:58 +0800 Subject: [PATCH] fix: upload folder support parent_id --- .../components/workflow/skill/hooks/use-create-operations.ts | 1 + web/service/use-app-asset.ts | 4 +++- web/types/app-asset.ts | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/skill/hooks/use-create-operations.ts b/web/app/components/workflow/skill/hooks/use-create-operations.ts index c7cd9e70df..26e7d8a04f 100644 --- a/web/app/components/workflow/skill/hooks/use-create-operations.ts +++ b/web/app/components/workflow/skill/hooks/use-create-operations.ts @@ -134,6 +134,7 @@ export function useCreateOperations({ appId, tree, files: fileMap, + parentId, }) Toast.notify({ diff --git a/web/service/use-app-asset.ts b/web/service/use-app-asset.ts index fb17b3ab47..ba73ff63d1 100644 --- a/web/service/use-app-asset.ts +++ b/web/service/use-app-asset.ts @@ -318,16 +318,18 @@ export const useBatchUpload = () => { appId, tree, files, + parentId, onProgress, }: { appId: string tree: BatchUploadNodeInput[] files: Map + parentId?: string | null onProgress?: (uploaded: number, total: number) => void }): Promise => { const response = await consoleClient.appAsset.batchUpload({ params: { appId }, - body: { children: tree }, + body: { children: tree, parent_id: parentId }, }) const uploadTasks: Array<{ path: string, file: File, url: string }> = [] diff --git a/web/types/app-asset.ts b/web/types/app-asset.ts index 01def5c400..28754a6c03 100644 --- a/web/types/app-asset.ts +++ b/web/types/app-asset.ts @@ -178,6 +178,7 @@ export type BatchUploadNodeOutput = { * Request payload for batch upload */ export type BatchUploadPayload = { + parent_id?: string | null children: BatchUploadNodeInput[] }