Allow docx conversion in the chatFunction.ts

This commit is contained in:
sabaimran 2024-11-09 18:51:00 -08:00
parent 459318be13
commit 835fa80a4b

View file

@ -294,6 +294,9 @@ export async function packageFilesForUpload(files: FileList): Promise<FormData>
fileType = "text/html"; fileType = "text/html";
} else if (fileExtension === "pdf") { } else if (fileExtension === "pdf") {
fileType = "application/pdf"; fileType = "application/pdf";
} else if (fileExtension === "docx") {
fileType =
"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
} else { } else {
// Skip this file if its type is not supported // Skip this file if its type is not supported
resolve(); resolve();