mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:17:00 +00:00
feat: allow multiple files to be uploaded
This commit is contained in:
parent
41755a8af4
commit
c20494d99b
@ -96,6 +96,12 @@ export const getImageByUrl = (url, options) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toFileObject(item) {
|
function toFileObject(item) {
|
||||||
|
console.log(item);
|
||||||
|
if (typeof item !== 'object') {
|
||||||
|
return {
|
||||||
|
id: item,
|
||||||
|
}
|
||||||
|
}
|
||||||
if (item.id && item.uid && item.url) {
|
if (item.id && item.uid && item.url) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
@ -143,6 +149,7 @@ export const Upload = connect({
|
|||||||
<AntdUpload
|
<AntdUpload
|
||||||
{...uploadProps}
|
{...uploadProps}
|
||||||
fileList={fileList}
|
fileList={fileList}
|
||||||
|
multiple={true}
|
||||||
>
|
>
|
||||||
<Button><UploadOutlined /> 上传文件</Button>
|
<Button><UploadOutlined /> 上传文件</Button>
|
||||||
</AntdUpload>
|
</AntdUpload>
|
||||||
|
Loading…
Reference in New Issue
Block a user