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

This commit is contained in:
G30 2026-10-20 13:14:22 -04:00 • committed by GitHub
parent 8e7ab75d81
commit bb8d49ff31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 = () => {