From d835f4830764798739c08418b0cca843baee4cc9 Mon Sep 17 00:00:00 2001 From: Rakshit Tiwari Date: Sat, 21 Jun 2025 20:20:30 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20feat:=20Support=20`.h`?= =?UTF-8?q?=20Files=20(#7978)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/data-provider/src/file-config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/data-provider/src/file-config.ts b/packages/data-provider/src/file-config.ts index 80521b4c4..f09fce7cc 100644 --- a/packages/data-provider/src/file-config.ts +++ b/packages/data-provider/src/file-config.ts @@ -115,7 +115,7 @@ export const excelMimeTypes = /^application\/(vnd\.ms-excel|msexcel|x-msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls|vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet)$/; export const textMimeTypes = - /^(text\/(x-c|x-csharp|tab-separated-values|x-c\+\+|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv))$/; + /^(text\/(x-c|x-csharp|tab-separated-values|x-c\+\+|x-h|x-java|html|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|css|vtt|javascript|csv))$/; export const applicationMimeTypes = /^(application\/(epub\+zip|csv|json|pdf|x-tar|typescript|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation|spreadsheetml\.sheet)|xml|zip))$/; @@ -142,6 +142,7 @@ export const codeTypeMapping: { [key: string]: string } = { c: 'text/x-c', cs: 'text/x-csharp', cpp: 'text/x-c++', + h: 'text/x-h', md: 'text/markdown', php: 'text/x-php', py: 'text/x-python', @@ -159,7 +160,7 @@ export const codeTypeMapping: { [key: string]: string } = { }; export const retrievalMimeTypes = [ - /^(text\/(x-c|x-c\+\+|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|vtt|xml))$/, + /^(text\/(x-c|x-c\+\+|x-h|html|x-java|markdown|x-php|x-python|x-script\.python|x-ruby|x-tex|plain|vtt|xml))$/, /^(application\/(json|pdf|vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|presentationml\.presentation)))$/, ];