mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-30 23:28:35 +00:00
fix: issue 2685 (#2686)
Co-authored-by: cumbermiao <cumbermiao@163.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
6937b970e5
commit
105a5ada49
@ -84,11 +84,18 @@ export default function DocUploadForm(props: IProps) {
|
||||
} else if (docType !== 'DOCUMENT' && !docId) {
|
||||
return message.error('Upload failed, please re-upload.');
|
||||
}
|
||||
|
||||
let fileList = files;
|
||||
if (docType === 'DOCUMENT') {
|
||||
const originFiles = Array.from(data.originFileObj.fileList);
|
||||
fileList = fileList.filter((item: File) => originFiles.some(ofile => ofile.name === item.name));
|
||||
}
|
||||
|
||||
handleStepChange({
|
||||
label: 'forward',
|
||||
files:
|
||||
docType === 'DOCUMENT'
|
||||
? files
|
||||
? fileList
|
||||
: [
|
||||
{
|
||||
name: docName,
|
||||
|
Loading…
Reference in New Issue
Block a user