fix: an attached webpage stays when file upload is not allowed (#32701)

This commit is contained in:
G30 authored and GitHub committed 2026-10-21 02:14:22 +09:00
1 parent 8e7ab75d81
commit bb8d49ff31
1 file changed
+2 -2
@@ -74,8 +74,8 @@
$: webUploadEnabled = $user?.role === 'admin' || ($user?.permissions?.chat?.web_upload ?? true);
$: toolPermissionsEnabled = $config?.features?.enable_tool_permissions ?? false;
$: if (!fileUploadEnabled && files.length > 0) {
files = [];
$: if (!fileUploadEnabled && files.some((file) => file.type !== 'text')) {
files = files.filter((file) => file.type === 'text');
}
const detectMobile = () => {