Wraps HxInputFileCore
as Bootstrap form control (incl. Label
etc.)
<HxInputFile Label="Image" Accept="image/*,.custom" MaxFileSize="500000" />
FileIndex | Filename | Progress | ContentType | Size | LastModified | ResponseStatus | ResponseText |
---|
Name | Type | Description |
---|---|---|
Accept | string |
Takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow. MDN Web Docs - HTML attribute: accept. |
CssClass | string |
Custom CSS class to render with wrapping div. |
Enabled | bool? |
When null (default), the Enabled value is received from cascading FormState .
When value is false , input is rendered as disabled.
To set multiple controls as disabled use HxFormState . |
Hint | string |
Hint to render after input as form-text. |
HintTemplate | RenderFragment |
Hint to render after input as form-text. |
InputCssClass | string |
Custom CSS class to render with the input element. |
InputSize | InputSize? |
Size of the input. |
Label | string |
Label to render before input (or after input for Checkbox). |
LabelCssClass | string |
Custom CSS class to render with the label. |
LabelTemplate | RenderFragment |
Label to render before input (or after input for Checkbox). |
MaxFileSize | long? |
The maximum files size in bytes.
When exceeded, the OnFileUploaded returns 413-RequestEntityTooLarge as FileUploadedEventArgs.ResponseStatus .
Default is null (unlimited). |
MaxParallelUploads | int? |
Maximum number of concurrent uploads. Default is 6 (from HxInputFileCore ). |
Multiple | bool |
Single false or multiple true files upload. |
OnChange | EventCallback<InputFileChangeEventArgs> |
Gets or sets the event callback that will be invoked when the collection of selected files changes. |
OnFileUploaded | EventCallback<FileUploadedEventArgs> |
Raised after a file is uploaded (for every single file separately). |
OnProgress | EventCallback<UploadProgressEventArgs> |
Raised during running file upload (the frequency depends on browser implementation). |
OnUploadCompleted | EventCallback<UploadCompletedEventArgs> |
Raised when all files are uploaded (after all OnFileUploaded events). |
Settings | InputFileSettings |
Set of settings to be applied to the component instance (overrides HxInputFile.Defaults , overridden by individual parameters). |
UploadUrl | string |
URL of the server endpoint receiving the files. |
Name | Type | Description |
---|---|---|
FileCount | int |
Last known count of associated files. |
Method | Returns | Description |
---|---|---|
GetFilesAsync() | Task<FileInfo<>> |
Gets list of files chosen. |
ResetAsync() | Task |
Clears associated input-file element and resets component to initial state. |
StartUploadAsync(string accessToken) | Task |
Starts the upload. |
UploadAsync(string accessToken) | Task<UploadCompletedEventArgs> |
Uploads the file(s). |
Property | Type | Description |
---|---|---|
Defaults | InputFileSettings |
Application-wide defaults for the HxInputFile and derived components. |
Raw component extending InputFile
with direct upload.
Name | Type | Description |
---|---|---|
Accept | string |
Takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow. MDN Web Docs - HTML attribute: accept. |
AdditionalAttributes | IDictionary<string, object> |
A collection of additional attributes that will be applied to the created element. |
Enabled | bool |
Make the item appear disabled by setting to false .
Default is true . |
Id | string |
Input element id. |
MaxFileSize | long? |
The maximum files size in bytes.
When exceeded, the OnFileUploaded returns 413-RequestEntityTooLarge as FileUploadedEventArgs.ResponseStatus .
Default is long.MaxValue (unlimited). |
MaxParallelUploads | int? |
Maximum number of concurrent uploads. Default is 6 . |
Multiple | bool |
Single false or multiple true files upload. |
OnChange | EventCallback<InputFileChangeEventArgs> |
|
OnFileUploaded | EventCallback<FileUploadedEventArgs> |
Raised after a file is uploaded (for every single file separately). |
OnProgress | EventCallback<UploadProgressEventArgs> |
Raised during running file upload (the frequency depends on browser implementation). |
OnUploadCompleted | EventCallback<UploadCompletedEventArgs> |
Raised when all files are uploaded (after all OnFileUploaded events). |
Settings | InputFileCoreSettings |
Set of settings to be applied to the component instance (overrides HxInputFileCore.Defaults , overridden by individual parameters). |
UploadUrl | string |
URL of the server endpoint receiving the files. |
Name | Type | Description |
---|---|---|
Element | ElementReference? |
|
FileCount | int |
Last known count of associated files. |
Method | Returns | Description |
---|---|---|
GetFilesAsync() | Task<FileInfo<>> |
Gets list of files chosen. |
ResetAsync() | Task |
Clears associated input element and resets component to initial state. |
StartUploadAsync(string accessToken) | Task |
Initiates the upload (does not wait for upload completion). Use OnUploadCompleted event. |
UploadAsync(string accessToken) | Task<UploadCompletedEventArgs> |
Uploads the file(s). |
Property | Type | Description |
---|---|---|
Defaults | InputFileCoreSettings |
Application-wide defaults for the HxInputFileCore . |