Name | Type | Default | Description |
Accept | string | "null" | Sets or gets the file types that can be submitted to the server via the element. This property corresponds to the 'accept' attribute of the hidden file input which is submitted to the URL specified by the uploadUrl property. |
AppendTo | string | "null" | Appends the list with selected files to a new custom container specified by the user. If the value of the property is a string it must represent a valid id of an HTML element inside the DOM that will be used as the new container for the uploaded files list. |
AutoUpload | bool | false | Sets or gets whether files will be automatically uploaded after selection. |
Directory | bool | false | Allows to upload a directory. Files in all subfolders will be uploaded also. This option is supported only in Firefox and Chrome. |
Disabled | bool | false | Enables or disables the element. |
DropZone | object | N/A | Defines a custom container that will be used as the new drop zone for file uploads. The dropped files will be added in the fileUpload's list. If 'dropZone' property set to true, the default drop zone inside the element will be used instead. If set to certain id of an HTML element inside the DOM then it will be used as the drop zone. |
HideFooter | bool | false | Hides the footer element and it's contents (Upload All, Pause All and Close All buttons). |
ItemTemplate | object | N/A | Applies a custom template to the file items that represent the uploaded files. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Sets the various text values used in the widget. Useful for localization. The localization object has the following fields: browse, pauseFile, cancelFile, uploadFile, pauseAll, cancelAll, uploadAll. It's recommended these messages to be set before element's initialization. |
Multiple | bool | false | Sets or gets whether multiple item uploads are allowed. |
Name | string | "" | Sets or gets the name attribute of the hidden file input which is submitted to the URL specified by the uploadUrl property. |
Readonly | bool | false | If the element is readonly, users cannot interact with it. |
ResponseHandler | object | N/A | Callback that can used to handle various server responses and error codes. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
SetHeaders | object | N/A | Callback function, used to change the headers of the file upload's XHR request. |
ShowProgress | bool | false | Displays a progress bar at the bottom of each uploaded item to show the progress of the uploading process. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
UploadUrl | string | "" | Sets or gets the upload URL. This property corresponds to the upload form's action attribute. For example, the uploadUrl property can point to a PHP file, which handles the upload operation on the server-side. |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Value | object | N/A | Gets the file upload value. |
ValidateFile | object | N/A | Callback used to validate the files immediatelly after their selection. Retuns a boolean value. If the returned value is false, the file is removed from list and a 'validationError is fired. |
Name | Type | Arguments | Description |
Browse | void | N/A | Opens a popup to browse for a file. |
CancelAll | void | N/A | Cancels all selected files. The files are removed from the list and their uploading is prevented. |
CancelFile | void | int index | Cancels a selected file. The file is removed from the file list and it's uploading is prevented.Args: int index - Index of the file which will be canceled. |
GetValueAsync() | Task<object> | 'N/A' | Gets the "Value" property as Task<object>. |
PauseAll | void | N/A | Pauses the uploading of all files. File upload is prevented but the files remain in the file list. |
PauseFile | void | int id | Pauses upload of a file with particular index. File upload is prevented but file ramains in the file list.Args: string id - Index of the file which will be paused. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
UploadAll | void | N/A | Uploads all selected files. |
UploadFile | void | int id | Uploads a selected file.Args: string id - Index of the file which will be uploaded. |
Name | Type | Description | Event Detail |
OnFileSelected | EventCallback<Event> | This event is triggered when a file has been selected. | dynamic filename- The name of the selected file., dynamic type- The type of the selected file., dynamic size- The size of the selected file., int index- The index of the selected file. |
FileSelected | event FileUploadFileSelectedEventHandler | This event is triggered when a file has been selected. | FileUploadFileSelectedEventArgs |
OnUploadCanceled | EventCallback<Event> | This event is triggered when a file upload operation is canceled. | dynamic filename- The name of the canceled file., dynamic type- The type of the canceled file., dynamic size- The size of the canceled file., int index- The index of the canceled file. |
UploadCanceled | event FileUploadUploadCanceledEventHandler | This event is triggered when a file upload operation is canceled. | FileUploadUploadCanceledEventArgs |
OnUploadCompleted | EventCallback<Event> | This event is triggered when a file upload operation is completed. | dynamic filename- The name of the canceled file., dynamic type- The type of the canceled file., dynamic size- The size of the canceled file., int index- The index of the canceled file., dynamic status- The status of the uploaded file. Whether there was an error or success. |
UploadCompleted | event FileUploadUploadCompletedEventHandler | This event is triggered when a file upload operation is completed. | FileUploadUploadCompletedEventArgs |
OnUploadError | EventCallback<Event> | This event is triggered when during the file upload process something happens and upload fails. | dynamic filename- The name of the canceled file., dynamic type- The type of the canceled file., dynamic size- The size of the canceled file., int index- The index of the canceled file., dynamic status- The status of the uploaded file. Whether there was an error or success. |
UploadErrored | event FileUploadUploadErroredEventHandler | This event is triggered when during the file upload process something happens and upload fails. | FileUploadUploadErroredEventArgs |
OnUploadPaused | EventCallback<Event> | This event is triggered when a file upload operation is paused. | dynamic filename- The name of the paused file., dynamic type- The type of the paused file., dynamic size- The size of the paused file., int index- The index of the paused file. |
UploadPaused | event FileUploadUploadPausedEventHandler | This event is triggered when a file upload operation is paused. | FileUploadUploadPausedEventArgs |
OnUploadStarted | EventCallback<Event> | This event is triggered when a file upload operation is started. | dynamic filename- The name of the file that is being uploaded., dynamic type- The type of the file that is being uploaded., dynamic size- The size of the file that is being uploaded., int index- The index of the file that is being uploaded. |
UploadStarted | event FileUploadUploadStartedEventHandler | This event is triggered when a file upload operation is started. | FileUploadUploadStartedEventArgs |
OnValidationError | EventCallback<Event> | This event is triggered if the validation of a user defined 'validateFile' callback fails. | dynamic filename- The name of the file which validation has failed., dynamic type- The type of the file which validation has failed., dynamic size- The size of the file which validation has failed. |
ValidationErrored | event FileUploadValidationErroredEventHandler | This event is triggered if the validation of a user defined 'validateFile' callback fails. | FileUploadValidationErroredEventArgs |