feat: allow multiple files to be uploaded

This commit is contained in:
chenos 2020-12-30 11:20:46 +08:00
parent 41755a8af4
commit c20494d99b

View File

@ -96,6 +96,12 @@ export const getImageByUrl = (url, options) => {
}
function toFileObject(item) {
console.log(item);
if (typeof item !== 'object') {
return {
id: item,
}
}
if (item.id && item.uid && item.url) {
return item;
}
@ -143,6 +149,7 @@ export const Upload = connect({
<AntdUpload
{...uploadProps}
fileList={fileList}
multiple={true}
>
<Button><UploadOutlined /> </Button>
</AntdUpload>