Commit fdb97b7e by zhaochengxiang

资产导入文件小于20M

parent 3f1796ba
...@@ -109,6 +109,13 @@ const ImportAssetDrawer = (props) => { ...@@ -109,6 +109,13 @@ const ImportAssetDrawer = (props) => {
}, },
beforeUpload: file => { beforeUpload: file => {
const isLt2OM = file.size / 1024 / 1024 < 20;
if (!isLt2OM) {
showMessage('error', '上传文件必须小于20M');
setFileList([]);
return false;
}
setFileList([file]); setFileList([file]);
return false; return false;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment