Skip to content

Comments

Chat file upload error#709

Merged
paullizer merged 2 commits intoDevelopmentfrom
chat-file-upload-error
Feb 11, 2026
Merged

Chat file upload error#709
paullizer merged 2 commits intoDevelopmentfrom
chat-file-upload-error

Conversation

@paullizer
Copy link
Contributor

  • Chat File Upload "Unsupported File Type" Fix
    • Fixed issue where uploading xlsx, png, jpg, csv, and other image/tabular files in the chat interface returned a 400 "Unsupported file type" error.
    • Root Cause: os.path.splitext() returns extensions with a leading dot (e.g., .png), but the IMAGE_EXTENSIONS and TABULAR_EXTENSIONS sets in config.py store extensions without dots (e.g., png). The comparison '.png' in {'png', ...} was always False, causing all image and tabular uploads to fall through to the unsupported file type error.
    • Solution: Added file_ext_nodot = file_ext.lstrip('.') and used the dot-stripped extension for set comparisons against IMAGE_EXTENSIONS and TABULAR_EXTENSIONS, matching the pattern already used in functions_documents.py.
    • (Ref: route_frontend_chats.py, file extension comparison, IMAGE_EXTENSIONS, TABULAR_EXTENSIONS)

@paullizer paullizer linked an issue Feb 11, 2026 that may be closed by this pull request
@paullizer paullizer changed the base branch from main to Development February 11, 2026 19:00
@paullizer paullizer merged commit b529d60 into Development Feb 11, 2026
2 checks passed
@paullizer paullizer deleted the chat-file-upload-error branch February 11, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File unsupported error when uploading supported files

1 participant