<Upload
beforeUpload={checkType}
onChange={handleOnChange}
className="dragger"
showUploadList={false}
>
<Row>
<FileImageTwoTone />
<p className="dragger-text">Drag and drop your email here</p>
</Row>
</Upload>
在checkType中:
const checkType = (file:any) => {
if (file.type !== 'application/vnd.ms-outlook') {
message.error(`${file.name} is not a msg file`);
}
return file.type === 'application/vnd.ms-outlook' ? true : Upload.LIST_IGNORE;
}
逻辑上好像没问题,问题在 application/vnd.ms-outlook 不是正确的.msg的type。
请问有人知道 .msg 的 file.type 吗?
谢谢