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:
cumbersun 2025-05-15 15:53:12 +08:00 committed by GitHub
parent 6937b970e5
commit 105a5ada49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,