这是indexloc提供的服务,不要输入任何密码
Skip to content

[FEAT]: Allow file attachment capability for normal/default users #2533

@mevlutakar

Description

@mevlutakar

What would you like to see?

Currently, file attachment functionality is only available for admin users. I would like to suggest enabling this feature for all users (both admin and normal users).

I found the restriction in:
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx

Current code has this check:

if (!!user && user.role === "default") return null;

I tried to modify it similar to this PR:

https://github.com/TuanBC/anything-llm/blob/934748615b7af58f6ca37590898c517187f411e4/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx

I removed the role check to allow all users to use the attachment feature, but it still doesn't work. Normal users still can't see the attachment button.
Expected behavior:

All users should be able to see the attachment button
All users should be able to attach files to their chats
The attachment functionality should work the same way it does for admin users

Is there any additional configuration or permission setting that needs to be changed besides modifying the index.jsx file? Looking forward to your guidance on the correct way to implement this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions