|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: donghao donghao@supervision.ltd
|
|
|
|
|
* @Date: 2024-06-04 15:14:27
|
|
|
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
|
|
|
* @LastEditTime: 2024-06-17 14:23:18
|
|
|
|
|
* @LastEditTime: 2024-06-26 15:16:52
|
|
|
|
|
* @FilePath: \general-ai-platform-web\src\components\UploadFile\src\FormUploadDraggerToken.tsx
|
|
|
|
|
* @Description: 手动文件上传、删除
|
|
|
|
|
* // TODO 需要支持多文件上传
|
|
|
|
@ -84,7 +84,7 @@ const FormUploadDraggerToken: React.FC<FormUploadDraggerTokenProps> = (props) =>
|
|
|
|
|
const onRemoveFile = async (file: UploadFile<R<string>>) => {
|
|
|
|
|
console.log(file, 'onRemoveFile_file', fileList);
|
|
|
|
|
const currFile = fileList.find((item) => item.uid === file.uid);
|
|
|
|
|
const resp = await apiFileDelete({ file_md5: currFile?.fileId });
|
|
|
|
|
const resp = await apiFileDelete({ file_md5: currFile?.fileId || file?.uid });
|
|
|
|
|
console.log(resp, 'apiFileDelete_resp');
|
|
|
|
|
props.afterRemoveFile(resp, file);
|
|
|
|
|
setPreviewFile(null);
|
|
|
|
|