From c20494d99b41d815b5bf71a4fb78de3167514925 Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 30 Dec 2020 11:20:46 +0800 Subject: [PATCH] feat: allow multiple files to be uploaded --- packages/app/src/components/form.fields/upload/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/app/src/components/form.fields/upload/index.tsx b/packages/app/src/components/form.fields/upload/index.tsx index cc50dcea2..3134d1119 100644 --- a/packages/app/src/components/form.fields/upload/index.tsx +++ b/packages/app/src/components/form.fields/upload/index.tsx @@ -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({