fix: upload folder support parent_id

This commit is contained in:
yyh
2026-01-23 16:13:58 +08:00
parent 63ffac6afe
commit dcd79df9fb
3 changed files with 5 additions and 1 deletions

View File

@ -134,6 +134,7 @@ export function useCreateOperations({
appId,
tree,
files: fileMap,
parentId,
})
Toast.notify({

View File

@ -318,16 +318,18 @@ export const useBatchUpload = () => {
appId,
tree,
files,
parentId,
onProgress,
}: {
appId: string
tree: BatchUploadNodeInput[]
files: Map<string, File>
parentId?: string | null
onProgress?: (uploaded: number, total: number) => void
}): Promise<void> => {
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 }> = []

View File

@ -178,6 +178,7 @@ export type BatchUploadNodeOutput = {
* Request payload for batch upload
*/
export type BatchUploadPayload = {
parent_id?: string | null
children: BatchUploadNodeInput[]
}