forked from open-webui/open-webui
		
	feat: Add epub support
This commit is contained in:
		
							parent
							
								
									f079cb6b56
								
							
						
					
					
						commit
						f559068186
					
				
					 6 changed files with 35 additions and 11 deletions
				
			
		|  | @ -121,13 +121,19 @@ | |||
| 			error: '' | ||||
| 		}; | ||||
| 
 | ||||
| 		files = [...files, doc]; | ||||
| 		const res = await uploadDocToVectorDB(localStorage.token, '', file); | ||||
| 		try { | ||||
| 			files = [...files, doc]; | ||||
| 			const res = await uploadDocToVectorDB(localStorage.token, '', file); | ||||
| 
 | ||||
| 		if (res) { | ||||
| 			doc.upload_status = true; | ||||
| 			doc.collection_name = res.collection_name; | ||||
| 			files = files; | ||||
| 			if (res) { | ||||
| 				doc.upload_status = true; | ||||
| 				doc.collection_name = res.collection_name; | ||||
| 				files = files; | ||||
| 			} | ||||
| 		} catch (e) { | ||||
| 			// Remove the failed doc from the files array | ||||
| 			files = files.filter((f) => f.name !== file.name); | ||||
| 			toast.error(e); | ||||
| 		} | ||||
| 	}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ export const WEB_UI_VERSION = 'v1.0.0-alpha-static'; | |||
| export const REQUIRED_OLLAMA_VERSION = '0.1.16'; | ||||
| 
 | ||||
| export const SUPPORTED_FILE_TYPE = [ | ||||
| 	'application/epub+zip', | ||||
| 	'application/pdf', | ||||
| 	'text/plain', | ||||
| 	'text/csv', | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dave Bauman
						Dave Bauman