Preview environment

class FileUploadBuilder

declare class FileUploadBuilder extends ComponentBuilder<APIFileUploadComponent>

A builder that creates API-compatible JSON data for file uploads.

Constructors

constructor()

Creates a new file upload.

The API data associated with this component.

Inherited from: ComponentBuilder

clearId() : this

Clears the id of this component, defaulting to a default incremented id.

Inherited from: ComponentBuilder

clearMaxValues() : this

Clears the maximum values.

clearMinValues() : this

Clears the minimum values.

setCustomId(
customId: string
) : this

Sets the custom id for this file upload.

setId(
id: number
) : this

Sets the id (not the custom id) for this component.

Inherited from: ComponentBuilder

setMaxValues(
maxValues: number
) : this

Sets the maximum number of file uploads required.

setMinValues(
minValues: number
) : this

Sets the minimum number of file uploads required.

setRequired(
required?: boolean
) : this

Sets whether this file upload is required.

Serializes this builder to API-compatible JSON data.