Skip to content

[Enhancement]: Support .conf uploads as text (MIME inference) #11092

@GPTLeonard

Description

@GPTLeonard

What features would you like to see added?

LibreChat should accept .conf files as text uploads. Right now uploads can fail with "Unable to determine file type for ... .conf" because the client-side MIME inference doesn't map the .conf extension. This is a tiny change: add a single mapping so .conf becomes text/x-conf, which is already allowed by default text MIME patterns in config.

Suggested code change (very small):

// packages/data-provider/src/file-config.ts export const codeTypeMapping: { [key: string]: string } = { // ... conf: 'text/x-conf', };

More details

  • The config already supports text/x-conf in many setups (e.g. fileConfig.text.supportedMimeTypes).
  • The failure happens before server validation: the client can't infer a MIME type for .conf, so it blocks the upload.
  • Adding the mapping fixes the error and allows .conf files to be treated as text without affecting any other types.

Which components are impacted by your request?

No response

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions