Skip to main content

Upload

Container properties

All component configurations support Container properties at the first level.

Component properties

NameTypeDefaultSupports Variable PatternDescription
classNamestring✔️component's className
styleobjectcomponent style
listType'picture-card' | 'text'Default style provided by upload component
uploadTitlestringtext title of upload button
subTitlestringText subtitle of upload button
maxCountnumberMaximum number of uploaded files
maxCountnumberMaximum number of uploaded files
acceptstringmimetype accepted by uploading files
sizeLimitnumberSize limits for uploading files
multipleboolfalseWhether multiple file uploads are supported
buttonPropsobjectfalseProperties of upload button
useOnlinePreviewboolfalsePreview using the online preview service, otherwise the behavior of calling the browser to open the link by default

All the remaining componentsProps will be passed to the component root element(Upload)。

JS API

The interface obtained through formApi.getFieldApi() is as follows:

NameTypeDescription
nodeHTML ElementThe root DOM element of the component