forked from open-webui/open-webui
		
	feat: docx support
This commit is contained in:
		
							parent
							
								
									537a7f5f00
								
							
						
					
					
						commit
						57c050326c
					
				
					 3 changed files with 29 additions and 4 deletions
				
			
		|  | @ -143,7 +143,14 @@ | |||
| 					const file = inputFiles[0]; | ||||
| 					if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) { | ||||
| 						reader.readAsDataURL(file); | ||||
| 					} else if (['application/pdf', 'text/plain', 'text/csv'].includes(file['type'])) { | ||||
| 					} else if ( | ||||
| 						[ | ||||
| 							'application/pdf', | ||||
| 							'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | ||||
| 							'text/plain', | ||||
| 							'text/csv' | ||||
| 						].includes(file['type']) | ||||
| 					) { | ||||
| 						uploadDoc(file); | ||||
| 					} else { | ||||
| 						toast.error(`Unsupported File Type '${file['type']}'.`); | ||||
|  | @ -249,7 +256,14 @@ | |||
| 							const file = inputFiles[0]; | ||||
| 							if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) { | ||||
| 								reader.readAsDataURL(file); | ||||
| 							} else if (['application/pdf', 'text/plain', 'text/csv'].includes(file['type'])) { | ||||
| 							} else if ( | ||||
| 								[ | ||||
| 									'application/pdf', | ||||
| 									'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | ||||
| 									'text/plain', | ||||
| 									'text/csv' | ||||
| 								].includes(file['type']) | ||||
| 							) { | ||||
| 								uploadDoc(file); | ||||
| 								filesInputElement.value = ''; | ||||
| 							} else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek