Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
📧 fix: Add .eml (message/rfc822) Support to File Upload (#13989)
Malte Polleye88f7a8f196c
diff --git a/packages/data-provider/src/file-config.spec.ts b/packages/data-provider/src/file-config.spec.tsindex b564f5a913..c5380c12b6 100644--- a/packages/data-provider/src/file-config.spec.ts+++ b/packages/data-provider/src/file-config.spec.ts@@ -66,6 +66,19 @@ describe('inferMimeType', () => {it('should reject raw text/x-markdown without normalization', () => {expect(baseFileConfig.checkType('text/x-markdown')).toBe(false);});++ it('should infer message/rfc822 from extension when browser type is empty', () => {+ expect(inferMimeType('email.eml', '')).toBe('message/rfc822');+ });++ it('should pass through message/rfc822 when browser reports it', () => {+ expect(inferMimeType('email.eml', 'message/rfc822')).toBe('message/rfc822');+ });++ it('should produce a type accepted by checkType for .eml files', () => {+ const normalized = inferMimeType('test.eml', '');+ expect(baseFileConfig.checkType(normalized)).toBe(true);+ });});describe('applicationMimeTypes', () => {@@ -148,6 +161,10 @@ describe('supportedMimeTypes', () => {])('ODF type flows through supportedMimeTypes: %s', (mimeType) => {expect(checkSupported(mimeType)).toBe(true);});++ it('message/rfc822 (.eml) flows through supportedMimeTypes', () => {+ expect(checkSupported('message/rfc822')).toBe(true);+ });});describe('documentParserMimeTypes', () => {diff --git a/packages/data-provider/src/file-config.ts b/packages/data-provider/src/file-config.tsindex 06f6b4806d..8ca650c7e4 100644--- a/packages/data-provider/src/file-config.ts+++ b/packages/data-provider/src/file-config.ts@@ -69,6 +69,7 @@ export const fullMimeTypesList = ['application/vnd.oasis.opendocument.graphics','image/svg','image/svg+xml',+ 'message/rfc822',// Video formats'video/mp4','video/avi',@@ -228,6 +229,8 @@ export const supportedMimeTypes = [audioMimeTypes,/** Supported by LC Code Interpreter API *//^image\/(svg|svg\+xml)$/,+ /** .eml email files */+ /^message\/rfc822$/,];export const codeInterpreterMimeTypes = [@@ -284,6 +287,7 @@ export const codeTypeMapping: { [key: string]: string } = {cljs: 'text/plain', // .cljs - ClojureScript sourcecljc: 'text/plain', // .cljc - Clojure common sourceelm: 'text/plain', // .elm - Elm source+ eml: 'message/rfc822', // .eml - Email message (RFC 822)erl: 'text/plain', // .erl - Erlang sourcehrl: 'text/plain', // .hrl - Erlang headerex: 'text/plain', // .ex - Elixir source