fix: normalize file extension to lowercase before parsing (#6996) (#7105)
Files uploaded with an uppercase or mixed-case extension (e.g. `123.PDF`, `report.Docx`) failed to be parsed because the readFile worker matches the extension against a lowercase switch (`'pdf'`, `'docx'`, ...), so an uppercase suffix fell through to the default branch and threw "... is not supported". Normalize the extension to lowercase once at the lowest common entry point `readFileContentByBuffer`, instead of at each business-layer call site. This keeps business-layer behavior unchanged and covers all callers (chat upload, external url, dataset, local file) in a single place. Adds regression tests covering upper/mixed-case extensions. Fixes #6996 Co-authored-by: DadaVinqi <DadaVinqi@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment