Skip to content

Commit 0041d9a

Browse files
author
Gargi Singh
committed
fix(ui): allow .txt upload in Web UI
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 #373
1 parent 2426e32 commit 0041d9a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/src/components/common/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
export const SYSTEM = 'System' as const;
77

88
/** File extensions accepted for document processing upload (supports backend conversion). */
9-
export const SUPPORTED_UPLOAD_EXTENSIONS = '.pdf,.png,.jpg,.jpeg,.tiff,.tif,.xlsx,.xls,.csv,.doc,.docx' as const;
9+
export const SUPPORTED_UPLOAD_EXTENSIONS = '.pdf,.png,.jpg,.jpeg,.tiff,.tif,.xlsx,.xls,.csv,.doc,.docx,.txt' as const;
1010

1111
/** File extensions accepted for Discovery upload (PDF and images only — no backend conversion). */
1212
export const SUPPORTED_DISCOVERY_EXTENSIONS = '.pdf,.png,.jpg,.jpeg,.tiff,.tif' as const;
1313

1414
/** Human-readable label for supported processing upload formats. */
1515
export const SUPPORTED_UPLOAD_FORMATS_LABEL =
16-
'Supported formats: PDF, PNG, JPEG, TIFF, Excel (XLSX/XLS), CSV, and Word (DOC/DOCX). PDF and image files are processed with Textract; spreadsheet and Word files are supported through backend conversion.' as const;
16+
'Supported formats: PDF, PNG, JPEG, TIFF, Excel (XLSX/XLS), CSV, Word (DOC/DOCX), and plain text (TXT). PDF and image files are processed with Textract; spreadsheet, Word, and text files are supported through backend conversion.' as const;
1717

1818
export const LANGUAGE_CODES = [
1919
{ value: '', label: 'Choose a Language' },

0 commit comments

Comments
 (0)