[GH-ISSUE #2533] [FEAT]: Allow file attachment capability for normal/default users #1638

Closed
opened 2026-02-22 18:25:49 -05:00 by yindo · 6 comments
Owner

Originally created by @mevlutakar on GitHub (Oct 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2533

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.

Originally created by @mevlutakar on GitHub (Oct 25, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2533 ### 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.
yindo added the enhancementfeature request labels 2026-02-22 18:25:49 -05:00
yindo closed this issue 2026-02-22 18:25:49 -05:00
Author
Owner

@severfire commented on GitHub (Feb 14, 2025):

I do agree, we need this feature.
Also I noticed that if you drag and drop image, the functionality works.
So this may be bug/feature thing.

@severfire commented on GitHub (Feb 14, 2025): I do agree, we need this feature. Also I noticed that if you drag and drop image, the functionality works. So this may be bug/feature thing.
Author
Owner

@timothycarambat commented on GitHub (Feb 14, 2025):

Its not a bug, it is a feature request. Dragging & dropping documents results in an embedding while images are ephemeral attachments to the model

@timothycarambat commented on GitHub (Feb 14, 2025): Its not a bug, it is a feature request. Dragging & dropping documents results in an embedding while images are ephemeral attachments to the model
Author
Owner

@severfire commented on GitHub (Feb 18, 2025):

@timothycarambat Do you plan to incorporate the feature into AnythingLLM, and if yes, when it is planned?
Could you please reply by end of the day tomorrow? I will be grateful! Thank you!

@severfire commented on GitHub (Feb 18, 2025): @timothycarambat Do you plan to incorporate the feature into AnythingLLM, and if yes, when it is planned? Could you please reply by end of the day tomorrow? I will be grateful! Thank you!
Author
Owner

@severfire commented on GitHub (Feb 18, 2025):

@timothycarambat those two files are done, one as attachment method, other as drag and drop method by admin user:

Image
Image

While this is done by non admin user, there is no attachment icon yet the result seems same:

Image

I think it should be somehow distinguished

@severfire commented on GitHub (Feb 18, 2025): @timothycarambat those two files are done, one as attachment method, other as drag and drop method by admin user: ![Image](https://github.com/user-attachments/assets/65e01fc3-8ef8-49eb-a23e-9ba8df1614cd) ![Image](https://github.com/user-attachments/assets/7609726a-cad5-40b9-91e9-4a08ced72173) While this is done by non admin user, there is no attachment icon yet the result seems same: ![Image](https://github.com/user-attachments/assets/bec0665b-2066-4525-adee-1a49d2f80723) I think it should be somehow distinguished
Author
Owner

@timothycarambat commented on GitHub (Feb 18, 2025):

It is, by the text right below the title.
"Image attached" vs "File embedded" - neither of what you added was embedded and are the exact same thing twice.

Images are not embedded when dragged and dropped and that has never been the case

@timothycarambat commented on GitHub (Feb 18, 2025): It is, by the text right below the title. "Image attached" vs "File embedded" - neither of what you added was embedded and are the exact same thing twice. Images are not embedded when dragged and dropped and that has never been the case
Author
Owner

@severfire commented on GitHub (Feb 19, 2025):

@timothycarambat

I see It makes sense.
Docs are embedded and images are attached

Regarding

Image

Not being visible inside the simple user window makes it very confusing

Is there a way to enable it for simple users?
Even if could only make able for them to use images as attachments, without enabling to send documents for embedding.

Also I think images could be resized before sending to model (the size could be set in settings)

@severfire commented on GitHub (Feb 19, 2025): @timothycarambat I see It makes sense. Docs are embedded and images are attached Regarding ![Image](https://github.com/user-attachments/assets/a132266e-39b7-4e41-b1b6-3df2e5d27584) Not being visible inside the simple user window makes it very confusing Is there a way to enable it for simple users? Even if could only make able for them to use images as attachments, without enabling to send documents for embedding. Also I think images could be resized before sending to model (the size could be set in settings)
yindo changed title from [FEAT]: Allow file attachment capability for normal/default users to [GH-ISSUE #2533] [FEAT]: Allow file attachment capability for normal/default users 2026-06-05 14:41:52 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1638