I'm running into an issue trying to upload .cshtml files using the chat attachment paperclip icon and could use some guidance. My goal is to upload these for code refactoring.
When I click the paperclip and select a .cshtml file, I immediately get the error "Unable to determine file type" in the UI.
My Setup:
LibreChat via Docker (using docker-compose) on Windows 10.
Image: ghcr.io/danny-avila/librechat-dev:latest (Logs show backend v0.7.7).
Endpoints: OpenAI, Google, Anthropic.
Using docker-compose.override.yml to mount a custom librechat.yaml.
Server-Side Config: Initially focused on librechat.yaml. Added various MIME types (text/html, text/plain, application/octet-stream, even /) to supportedMimeTypes under default. (confirmed loaded via logs):
Test: Renaming MyPage.cshtml to MyPage.txt allows the file to upload successfully.
librechat.yaml fileConfig:
endpoints:
default: # OpenAI, Google, Anthropic
supportedMimeTypes:
"text/html" # For .cshtml
"text/plain" # General text, good fallback
"application/octet-stream" # Generic fallback type
Possibly client-side; JavaScript running in the browser is blocking the upload before it even attempts to send the file to the server. Tried multiple browswers.
The server-side fileConfig is correctly mounted and loaded but is never reached by the .cshtml file.
Investigating the frontend code (client/src/components/), it seems the standard attachment button (attachFile.tsx) uses an imported <FileUpload> component. I suspect this might be reusing a component (like the FileUpload.tsx I found that has accept=".json" hardcoded) or contains other client-side validation logic that incorrectly blocks .cshtml files, even though renaming to .txt works.
Has anyone encountered this specific client-side block for non-standard file extensions like .cshtml in v0.7.7 or recent dev builds?