注册上传增加filepath字段
This commit is contained in:
@ -148,7 +148,8 @@ const FileUpload: React.FC<FileUploadProps> = ({
|
||||
if (file.status === 'done' && file.response && !file.url) {
|
||||
return {
|
||||
...file,
|
||||
url: getFileUrl(file)
|
||||
url: getFileUrl(file),
|
||||
filePath: file?.response?.filePath || "filePath not found",
|
||||
};
|
||||
}
|
||||
return file;
|
||||
|
@ -864,6 +864,9 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
<Form.Item name={[field.name, 'fileSize']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item name={[field.name, 'filePath']} hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
|
||||
<Form.Item
|
||||
@ -880,6 +883,7 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
fileType: file.type,
|
||||
fileSize: file.size.toString(),
|
||||
fileUrl: file.url,
|
||||
filePath: file.filePath,
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -965,6 +969,7 @@ export const AttachmentSection: React.FC<CommonFormSectionsProps> = ({ form }) =
|
||||
fileType: file.type,
|
||||
fileSize: file.size.toString(),
|
||||
fileUrl: file.url,
|
||||
filePath: file.filePath,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user