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[] }