Browse Source

Merge pull request #14093 from open-webui/main

dev
Tim Jaeryang Baek 4 months ago
parent
commit
2b5c015bcb

+ 2 - 1
src/lib/components/admin/Settings/Documents.svelte

@@ -170,7 +170,8 @@
 			await embeddingModelUpdateHandler();
 		}
 
-		RAGConfig.ALLOWED_FILE_EXTENSIONS = RAGConfig.ALLOWED_FILE_EXTENSIONS.split(',')
+		RAGConfig.ALLOWED_FILE_EXTENSIONS = (RAGConfig?.ALLOWED_FILE_EXTENSIONS ?? '')
+			.split(',')
 			.map((ext) => ext.trim())
 			.filter((ext) => ext !== '');
 

+ 1 - 1
src/lib/components/common/FileItemModal.svelte

@@ -25,7 +25,7 @@
 		(item?.name && item?.name.toLowerCase().endsWith('.pdf'));
 
 	$: isAudio =
-		item?.meta?.content_type.startsWith('audio/') ||
+		(item?.meta?.content_type ?? '').startsWith('audio/') ||
 		(item?.name && item?.name.toLowerCase().endsWith('.mp3')) ||
 		(item?.name && item?.name.toLowerCase().endsWith('.wav')) ||
 		(item?.name && item?.name.toLowerCase().endsWith('.ogg')) ||