|
|
|
@@ -90,6 +90,10 @@ function MirrorCreate() { |
|
|
|
message.error('文件上传失败,请重新上传文件'); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!file.response || !file.response.data) { |
|
|
|
message.error('文件上传失败,请重新上传文件'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
params = { |
|
|
|
...omit(formData, ['fileList', 'upload_type']), |
|
|
|
@@ -119,7 +123,7 @@ function MirrorCreate() { |
|
|
|
|
|
|
|
const beforeUpload: UploadProps['beforeUpload'] = () => { |
|
|
|
const fileList = form.getFieldValue('fileList'); |
|
|
|
if (fileList.length >= 1) { |
|
|
|
if (Array.isArray(fileList) && fileList.length >= 1) { |
|
|
|
message.error('只允许上传一个文件'); |
|
|
|
return Upload.LIST_IGNORE; |
|
|
|
} |
|
|
|
|