Files
DeepTutor/web/components/knowledge
Bingxi Zhao (Frank) ea8e271fdc feat(knowledge): choose which KB folder an upload batch lands in
The last piece of #866. #899 stopped a linked folder's subdirectories from
collapsing, and same-named documents no longer overwrite or vanish — but the
reporter's actual workflow still could not rebuild his tree. He added one
subtree at a time, and a browser folder pick reports each file's path
relative to the chosen directory: `应用开发/钉钉CLI/` arrives as
`钉钉CLI/...`, with no way to say it belongs under `应用开发/`. Every batch
piled up at the KB root, and the ancestor was not missing data — it was
never in the payload.

Uploads now take an optional destination folder, composed ahead of each
file's own relative path. The picker offers the KB's existing folders (and
its root, the default) once files are staged, so batching a large tree is a
matter of picking where each part goes. It runs through the same
_sanitize_rel_subdir guard as a directory upload's own path, so a crafted
value cannot escape raw/.

Listing folders is best-effort: if that call fails the picker simply does
not appear and the batch goes to the root exactly as before.

Linked-folder sync keeps its own root-relative staging and does not take a
destination prefix yet — that needs the prefix persisted per linked folder
in metadata, which is a separate change.
2026-08-20 00:56:34 +08:00
..
2026-06-27 18:27:16 +08:00
2026-08-19 17:34:52 +08:00
2026-07-09 23:23:27 +08:00
2026-06-17 00:56:27 +08:00
2026-08-17 11:22:26 +08:00