ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

Feat: Upload file UI/UX enhancements

Open Omarlsg98 opened this issue 10 months ago • 6 comments

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: image

  • Errors on specific files image

Type of change

  • [X] New Feature (non-breaking change which adds functionality)

Omarlsg98 avatar Feb 25 '25 18:02 Omarlsg98

Please fix the error in uploading files

image

cike8899 avatar Feb 26 '25 02:02 cike8899

@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)

Omarlsg98 avatar Feb 27 '25 21:02 Omarlsg98

image

By default, no document parsing is required after uploading the file.

cike8899 avatar Feb 28 '25 10:02 cike8899

@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

Omarlsg98 avatar Feb 28 '25 16:02 Omarlsg98

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 avatar Mar 03 '25 02:03 KevinHuSh

@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!

Omarlsg98 avatar Mar 04 '25 16:03 Omarlsg98