A builder that creates API-compatible JSON data for file uploads.
Creates a new file upload.
Example
Creating a file upload from an API data object:Example
Creating a file upload using setters and API data:| Name | Type | Optional | Description |
|---|---|---|---|
| data | Partial<APIFileUploadComponent> | Yes | The API data to create this file upload with |
Readonly
The API data associated with this component.
Inherited from ComponentBuilderClears the id of this component, defaulting to a default incremented id.
Inherited from ComponentBuilderClears the maximum values.
Clears the minimum values.
Sets the custom id for this file upload.
| Name | Type | Optional | Description |
|---|---|---|---|
| customId | string | No | The custom id to use |
Sets the id (not the custom id) for this component.
| Name | Type | Optional | Description |
|---|---|---|---|
| id | number | No | The id for this component |
Sets the maximum number of file uploads required.
| Name | Type | Optional | Description |
|---|---|---|---|
| maxValues | number | No | The maximum values that can be uploaded |
Sets the minimum number of file uploads required.
| Name | Type | Optional | Description |
|---|---|---|---|
| minValues | number | No | The minimum values that must be uploaded |
Sets whether this file upload is required.
| Name | Type | Optional | Description |
|---|---|---|---|
| required | boolean | Yes | Whether this file upload is required |
Serializes this builder to API-compatible JSON data.