mirror of
https://github.com/langgenius/dify.git
synced 2026-04-19 18:27:27 +08:00
Refactor file-uploader component from 399 lines to 90 lines by extracting: - useFileUpload hook for upload logic and drag-drop handling - FileListItem component for individual file display - UploadDropzone component for drop area UI - Progress constants (PROGRESS_NOT_STARTED, PROGRESS_ERROR, PROGRESS_COMPLETE) Add getFileExtension utility to web/utils/format.ts for shared use. Test coverage: 102 tests with 100% line coverage for all file-uploader files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>