fix(ui): allow .txt upload in Web UI#374
Merged
rstrahan merged 2 commits intoJun 23, 2026
Merged
Conversation
Add .txt to SUPPORTED_UPLOAD_EXTENSIONS and update the format label so plain-text files can be selected in the Web UI. The backend OCR service already supports .txt via DocumentConverter.convert_text_to_pages(); this aligns the UI allow-list with existing backend capability. No backend changes required. Closes aws-solutions-library-samples#373
0041d9a to
1c60f6f
Compare
Addresses review feedback on aws-solutions-library-samples#374: - Add CHANGELOG.md entry under Unreleased/Fixed for the .txt upload fix (aws-solutions-library-samples#373) - Update upload FormField constraintText to reflect spreadsheet/Word/text backend conversion (previously only mentioned Excel) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.txt(plain text) to the Web UI upload allow-list to align the UI with existing backend support.Closes #373.
Why
The backend OCR service already processes
.txt(_process_non_pdf_document()→DocumentConverter.convert_text_to_pages()), but the UI file picker blocked it because.txtwas missing fromSUPPORTED_UPLOAD_EXTENSIONS. Users with plain-text corpora had to bypass the UI by uploading directly to S3.Changes
src/ui/src/components/common/constants.ts.txttoSUPPORTED_UPLOAD_EXTENSIONSSUPPORTED_UPLOAD_FORMATS_LABELto mention plain textNot changed
SUPPORTED_DISCOVERY_EXTENSIONS— Discovery remains intentionally PDF/image-only.txtprocessing path already exists and is in useTesting
npm run typecheckandeslintpass; full UI test suite (vitest) passes..txtfiles upload through the UI and process end-to-end (classification → extraction → assessment → summarization → KB indexing). No backend changes were needed.