dify/web/app
yyh 12ca422c8a
fix(app-assets): restore atomic batch upload for nested folder targets
The previous nested folder upload flow bypassed the backend batch-upload
contract when parentId was set. Instead of creating the whole metadata
tree in one backend operation, the frontend recursively called
createFolder/getFileUploadUrl for each node.

That introduced two regressions for uploads into subfolders:

- consistency regression: mid-sequence failures could leave partially
  created folder trees under the destination folder
- performance regression: metadata creation degraded from a single
  batch request to O(files + folders) round-trips before file bytes
  were uploaded

This change moves nested uploads back to the original batch semantics:

- add optional parent_id support to app asset batch-upload payload
- create the whole nested tree under the target parent in
  AppAssetService.batch_create_from_tree
- pass parentId through useBatchUpload instead of using per-node
  createFolder/getFileUploadUrl calls
- remove the now-unnecessary useBatchUploadOperation wrapper
- add a backend unit test covering batch tree creation under an
  existing parent folder

After this change, both root uploads and subfolder uploads use the same
single-request metadata creation path, preserving atomic tree creation
semantics and avoiding avoidable metadata round-trips.
2026-03-26 15:16:55 +08:00
..
(commonLayout) use base ui toast 2026-03-25 20:38:44 +08:00
(humanInputLayout)/form/[token] Merge main HEAD (segment 5) into sandboxed-agent-rebase 2026-03-23 14:20:06 +08:00
(shareLayout) Merge main HEAD (segment 5) into sandboxed-agent-rebase 2026-03-23 14:20:06 +08:00
account use base ui toast 2026-03-25 20:38:44 +08:00
activate refactor: route next/navigation through compat re-export (#33636) 2026-03-18 12:57:03 +08:00
components fix(app-assets): restore atomic batch upload for nested folder targets 2026-03-26 15:16:55 +08:00
education-apply use base ui toast 2026-03-25 20:38:44 +08:00
forgot-password refactor(web): update frontend toast call sites to use the new shortcut API (#33808) 2026-03-20 16:02:22 +08:00
init use base ui toast 2026-03-25 20:38:44 +08:00
install refactor: route next/navigation through compat re-export (#33636) 2026-03-18 12:57:03 +08:00
oauth-callback
repos/[owner]/[repo]/releases refactor: route low-cost next modules through compat re-exports (#33622) 2026-03-18 10:37:29 +08:00
reset-password Merge main HEAD (segment 5) into sandboxed-agent-rebase 2026-03-23 14:20:06 +08:00
signin use base ui toast 2026-03-25 20:38:44 +08:00
signup Merge main HEAD (segment 5) into sandboxed-agent-rebase 2026-03-23 14:20:06 +08:00
styles refactor: prefer instrumentation-client (#34009) 2026-03-25 09:54:25 +08:00
layout.tsx use base ui toast 2026-03-25 20:38:44 +08:00
page.spec.tsx fix: pass all CI quality checks - ESLint, TypeScript, basedpyright, pyrefly, lint-imports 2026-03-24 10:54:58 +08:00
page.tsx fix: pass all CI quality checks - ESLint, TypeScript, basedpyright, pyrefly, lint-imports 2026-03-24 10:54:58 +08:00
routePrefixHandle.tsx refactor: route next/navigation through compat re-export (#33636) 2026-03-18 12:57:03 +08:00