<LiveUpload>

Start of documentation content
Live upload file field.

This 'Live Upload' begins uploads immediately, rather than when the user submits the form.

This optimises for bandwidth (because uploading begins immediately so it ends earlier) and user feedback (because any upload errors are shown to the user earlier).

The destination of live uploads can be controlled with the <Formally> onLiveUpload={myLiveUpload} prop.

Use of <LiveUpload>

Preview

Formally: Loading form, please wait...

<LiveUpload>'s props

PropAboutType
cancelUploadHtml

Localisable HTML: Cancel 'upload in progress' button content

LocalisedHtml
clearUploadHtml

Localisable HTML: Clear upload button content

LocalisedHtml
hintHtml

Localisable HTML: Hint content

LocalisedHtml
isRequired

Whether users are required to fill in this form field.

This setting affects aria-required and whether a * is displayed next to the form field, etc.

boolean
labelHtml

Localisable HTML: Label content

LocalisedHtml
maxSizeAllFilesBytes

Maximum total file size of upload in bytes.

This is only client-side validation of file size. Servers should implement their own limits.

number
meta

Arbitrary metadata on this node.

This is useful when developing custom controls as it allows you to pass down metadata/extensions.

MetaData
multiple

The multiple attribute in HTML (MDN multiple attribute)

Whether to support multiple files in a single <input type="file">.

boolean
name

The name attribute in HTML (MDN name attribute)

Name of the form control.

Submitted with the form as part of a name:value pair in the <Formally onSubmit> callback prop valuesAsFormNames.

string
progressUploadingCompleteLabelHtml

Localisable HTML: Upload complete content

LocalisedHtml
progressUploadingInProgressLabelHtml

Localisable HTML: 'upload in progress' content

LocalisedHtml
validationErrorInvalidHtml

Localisable HTML: invalid validation content

LocalisedHtml
validationErrorRequiredHtml

Localisable HTML: required validation content

LocalisedHtml
id

Component Id.

Must be unique within the form.

string
hasChildrenById

Non-editable.

Used to indicate that this component doesn't have children.

false
hasTagsById

Non-editable.

Used to indicate that this component isn't a form field with tags by id.

false
isFormField

Non-editable.

Used to indicate that this component is a form field.

true
isMultichoice

Non-editable.

Used to indicate that this component isn't a multichoice form field like <Select>, <Radios> or <Checkboxes>.

false
type

Non-editable.

Type of component of "LiveUpload".

"LiveUpload"