feat(knowledgeBase): enhance file upload and dataset creation with abort support and improved UX
- Add AbortSignal support to uploadFile API for cancellable uploads - Implement custom onRemove callback in UploadFiles component with confirmation dialog - Add i18n translations for file removal confirmation and error messages - Update supported file types documentation to include IMAGE and MEDIA formats - Improve file removal UI with cursor pointer styling - Refactor getModelList API to remove unused type parameter - Add Form import and UploadFile type for better type safety in CreateDataset - Enhance error handling and user feedback for file operations
This commit is contained in:
@@ -293,7 +293,9 @@ export const en = {
|
||||
add: 'Add',
|
||||
addOption: 'Add Option',
|
||||
viewDetail: 'View Detail',
|
||||
confirmRemoveFile: 'Are you sure you want to remove this file?',
|
||||
deleteSuccess: 'Delete successfully',
|
||||
deleteFailed: 'Delete Failure',
|
||||
foldUp: 'Collapse',
|
||||
expanded: 'Expand',
|
||||
clickUploadIcon: 'click on the upload icon',
|
||||
@@ -468,7 +470,7 @@ export const en = {
|
||||
knowledgeBase: 'Knowledge Base',
|
||||
selectDataSource: 'Select Source',
|
||||
localFile: 'Local File',
|
||||
uploadFileTypes: 'Upload PDF, TXT, DOCX and other format files',
|
||||
uploadFileTypes: 'Upload PDF, TXT, DOCX, IMAGE, MEDIA and other format files',
|
||||
webLink: 'Web Link',
|
||||
webLinkPlaceholder:'Please enter',
|
||||
webLinkDesc: 'Only static links are supported. If the uploaded data shows as empty, the link may not be readable. One per line, with a maximum of {{count}} links at a time',
|
||||
@@ -476,6 +478,7 @@ export const en = {
|
||||
readStaticWebPage: 'Read static web page content as dataset',
|
||||
customText: 'Custom Text',
|
||||
customContent: 'Custom Content',
|
||||
createContentError: 'Failed to create custom content',
|
||||
manuallyInputText: 'Manually input a text as dataset',
|
||||
importTemplate: 'Template Import',
|
||||
importBackup: 'Backup Import',
|
||||
|
||||
@@ -91,7 +91,7 @@ export const zh = {
|
||||
operation: '操作',
|
||||
selectDataSource: '选择来源',
|
||||
localFile: '本地文件',
|
||||
uploadFileTypes: '上传 PDF、TXT、DOCX 等格式的文件',
|
||||
uploadFileTypes: '上传 PDF、TXT、DOCX, IMAGE, MEDIA 等格式的文件',
|
||||
webLink: '网页链接',
|
||||
webLinkPlaceholder: '请输入',
|
||||
webLinkDesc: '仅支持静态链接。如果上传的数据显示为空,则该链接可能无法读取。每行一个,一次最多{{count}}个链接',
|
||||
@@ -99,6 +99,7 @@ export const zh = {
|
||||
readStaticWebPage: '读取静态网页内容作为数据集',
|
||||
customText: '自定义文本',
|
||||
customContent: '自定义内容',
|
||||
createContentError: '创建自定义文件失败',
|
||||
manuallyInputText: '手动输入一段文本作为数据集',
|
||||
openKnowledgeBase: '打开知识库',
|
||||
searchPlaceholder: '搜索',
|
||||
@@ -784,7 +785,9 @@ export const zh = {
|
||||
add: '添加',
|
||||
addOption: '添加选项',
|
||||
viewDetail: '查看详情',
|
||||
confirmRemoveFile: '确定要移除此文件吗?',
|
||||
deleteSuccess: '删除成功',
|
||||
deleteFailed: '删除失败',
|
||||
foldUp: '收起',
|
||||
expanded: '展开',
|
||||
clickUploadIcon: '点击上传图标',
|
||||
|
||||
Reference in New Issue
Block a user