소스 검색

Normalize file extension to lowercase in isVectorStoreCompatible function

Shun Miyazawa 1 년 전
부모
커밋
e0e5e2ee9c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/app/src/features/openai/server/utils/is-vector-store-compatible.ts

+ 1 - 1
apps/app/src/features/openai/server/utils/is-vector-store-compatible.ts

@@ -29,7 +29,7 @@ type SupportedExtension = keyof typeof supportedFormats;
 
 export const isVectorStoreCompatible = (file: Express.Multer.File): boolean => {
   // Get extension
-  const extension = path.extname(file.originalname);
+  const extension = path.extname(file.originalname).toLowerCase();
 
   // Check if the file extension is supported
   if (!(extension in supportedFormats)) {