When will FormField support antd Multiple Upload?

I found that if I pass

uploadProps={{multiple: true}}


The Antd Upload Component can set multiple to true.

But cuba-react limit the uploaded file list to just one in handleChange event.


What should I do if I want to upload multiple files by cuba and react.

Hi @leonwzm,

Thank you for reporting the problem. We have created a GitHub issue to support multiple upload, you can track it here.

In the meantime, possible workarounds:

  1. Quick solution would be to create an intermediate entity File containing a file descriptor and replace the collection of file descriptors in SystemStandard with a collection of Files. That will allow uploading files one by one via File entity editor, and linking Files to SystemStandard via SystemStandard entity (where a multiple selection dropdown will be rendered instead of a file upload component).

  2. Replace FormField with a custom component in your SystemStandard entity editor. You can upload files using this REST API. This will give you the file ids. You can then provide a field value to the Form:

  {"id": "54d37836-4391-0dee-12d9-3d008e569fb1", "name":"img1.jpeg", "_entityName": "sys$FileDescriptor"},
  {"id": "a7ed6cda-5cda-8e82-2d4a-5c41a9b0afed", "name":"img2.jpeg", "_entityName": "sys$FileDescriptor"}

Hope that helps.

Best regards,

1 Like

Thank you for your reply. I will try the second option.