Feat: Upload file UI/UX enhancements
What problem does this PR solve?
Modifies the UX for uploading process on the website.
- Adds option to parse on creation the files
- Adds progress bar to display progress of chunk
- Adds per file feedback on uploading operation
Screenshots:
-
Show files uploading:
-
Errors on specific files
Type of change
- [X] New Feature (non-breaking change which adds functionality)
Please fix the error in uploading files
@cike8899 I'm not able to reproduce your error, can you give me more details on how it occurs?
Also, please notice I changed a couple of lines in the API server to return the successful files. Maybe you need to redeploy the backend with those changes(?)
err, files = FileService.upload_document(kb, file_objs, current_user.id)
files = [f[0] for f in files] # remove the blob
if err:
return get_json_result(
data=files, message="\n".join(err), code=settings.RetCode.SERVER_ERROR)
return get_json_result(data=files)
By default, no document parsing is required after uploading the file.
@cike8899 is there any reason the user would not want to parse the files? As far as i see the documents are useless if they are not parsed
Appreciations!
After uploading, people may want to alter the chunk method configuration instead of chunking by default method. The chunking configurations could be different from file to file.
@KevinHuSh That make sense! Maybe it will be better if the user could choose/override chunking methods directly on the upload file modal. Maybe for a future PR. @cike8899 I changed parseOnCreation to be false by default for now!