我这样做是为了拖放文件。如何访问已删除/上传的文件?文件上传正常。与此同时,我还可以看到文件已成功上传。
const config = {
name: "file",
multiple: false,
action: "https://www.mocky.io/v2/5cc8019d300000980a055e76",
onChange(info) {
const { status } = info.file;
if (status !== "uploading") {
console.log(info.file, info.fileList);
}
if (status === "done") {
message.success(`${info.file.name} file uploaded successfully.`);
} else if (status === "error") {
message.error(`${info.file.name} file upload failed.`);
}
}
}
const Section = props => {
return (
<section>
<div className="email-upload feature-content-right bg-white">
<div className="col-12 col-md-6 feature-callout-image-pull" />
<div className="container-fluid">
<div className="callout-feature-content">
<h1> Email Parser </h1>
<Dragger beforeUpload={props.handleBeforeUpload} {...config}>
<p className="ant-upload-drag-icon">
<Icon type="inbox" />
</p>
<Button type ="primary" className="ant-upload-text">
Upload your message!
</Button>
</Dragger>
</div>
</div>
</div>
</section>
);
};
export default Section;
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。