feat: async file upload

This commit is contained in:
Timothy Jaeryang Baek
2025-08-20 00:36:13 +04:00
parent efebf4d3a0
commit 5e1f4fa0ff
6 changed files with 211 additions and 55 deletions
@@ -182,6 +182,12 @@
if (uploadedFile) {
console.log(uploadedFile);
if (uploadedFile.error) {
console.warn('File upload warning:', uploadedFile.error);
toast.warning(uploadedFile.error);
}
knowledge.files = knowledge.files.map((item) => {
if (item.itemId === tempItemId) {
item.id = uploadedFile.id;