mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 13:25:20 +00:00
fix: Clear file list when selected models do not support file uploads
This commit is contained in:
parent
e24fec0de4
commit
1be9187236
1 changed files with 4 additions and 0 deletions
|
|
@ -56,6 +56,10 @@
|
||||||
fileUploadCapableModels.length === selectedModels.length &&
|
fileUploadCapableModels.length === selectedModels.length &&
|
||||||
($user?.role === 'admin' || $user?.permissions?.chat?.file_upload);
|
($user?.role === 'admin' || $user?.permissions?.chat?.file_upload);
|
||||||
|
|
||||||
|
$: if (!fileUploadEnabled && files.length > 0) {
|
||||||
|
files = [];
|
||||||
|
}
|
||||||
|
|
||||||
const detectMobile = () => {
|
const detectMobile = () => {
|
||||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
return /android|iphone|ipad|ipod|windows phone/i.test(userAgent);
|
return /android|iphone|ipad|ipod|windows phone/i.test(userAgent);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue