when I have defined the accept property of the Upload.Dragger component, this component cannot drag and drop upload files
<Upload.Dragger
multiple
listType="picture"
accept="application/xml"
beforeUpload={file => {
this.setState(state => ({
importFileList: [...state.importFileList, file],
}));
return false;
}}
onRemove={file => {
this.setState(state => {
const index = state.importFileList.indexOf(file);
const newFileList = state.importFileList.slice();
newFileList.splice(index, 1);
return {
importFileList: newFileList,
};
});
}}
>
<p className="ant-upload-drag-icon">
<Icon type="inbox" />
<p className="ant-upload-text">{formatMessage({ id: "" })}
<p className="ant-upload-hint">
{formatMessage({ id: "" })}: {`${type}` === "1" ? ".xml" : ".xlsx"}
</Upload.Dragger>