Class UploaderModel
Interface for a class Uploader.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class UploaderModel : Object
Constructors
UploaderModel()
Declaration
public UploaderModel()
Properties
ActionComplete
Triggers after all the selected files has processed to upload successfully or failed to server.
Declaration
public EventCallback<object> ActionComplete { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
AllowedExtensions
Specifies the extensions of the file types allowed in the Uploader component and pass the extensions with comma separators.
For example,if you want to upload specific image files, pass `AllowedExtensions` as ".jpg,.png".
Declaration
public string AllowedExtensions { get; set; }
Property Value
Type |
---|
System.String |
AsyncSettings
Configures the save and remove URL to perform the upload operations in the server asynchronously.
Declaration
public UploaderAsyncSettings AsyncSettings { get; set; }
Property Value
Type |
---|
UploaderAsyncSettings |
AutoUpload
By default, the Uploader component initiates automatic upload when the files are added in upload queue.
If you want to manipulate the files before uploading to server, disable the AutoUpload property.
The buttons "upload" and "clear" will be hided from file list when AutoUpload property is true.
Declaration
public bool AutoUpload { get; set; }
Property Value
Type |
---|
System.Boolean |
BeforeRemove
Triggers on remove the uploaded file. The event used to get confirm before remove the file from server.
Declaration
public EventCallback<object> BeforeRemove { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
BeforeUpload
Triggers when the upload process before. This event is used to add additional parameter with upload request.
Declaration
public EventCallback<object> BeforeUpload { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Buttons
You can customize the default text of "browse, clear, and upload" buttons with plain text or HTML elements. The buttons' text can be customized from localization also.
If you configured both `Locale` and `Buttons` property,the Uploader component considers the `Buttons` property value.
Declaration
public UploaderButtons Buttons { get; set; }
Property Value
Type |
---|
UploaderButtons |
Canceling
Fires if cancel the chunk file uploading.
Declaration
public EventCallback<object> Canceling { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Change
Triggers when changes occur in uploaded file list by selecting or dropping files.
Declaration
public UploadChangeEventArgs Change { get; set; }
Property Value
Type |
---|
UploadChangeEventArgs |
ChunkFailure
Fires if the chunk file failed to upload.
Declaration
public FailureEventArgs ChunkFailure { get; set; }
Property Value
Type |
---|
FailureEventArgs |
ChunkSuccess
Fires when the chunk file uploaded successfully.
Declaration
public SuccessEventArgs ChunkSuccess { get; set; }
Property Value
Type |
---|
SuccessEventArgs |
ChunkUploading
Fires when every chunk upload process gets started. This event is used to add additional parameter with upload request.
Declaration
public EventCallback<object> ChunkUploading { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Clearing
Triggers before clearing the items in file list when clicking "clear".
Declaration
public EventCallback<object> Clearing { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Created
Triggers when the Uploader is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
CssClass
Specifies the CSS class name that can be appended with root element of the Uploader. One or more custom CSS classes can be added to a Uploader.
Declaration
public string CssClass { get; set; }
Property Value
Type |
---|
System.String |
DirectoryUpload
Specifies a boolean value that indicates whether the folder of files can be browsed in the Uploader component.
Declaration
public bool DirectoryUpload { get; set; }
Property Value
Type |
---|
System.Boolean |
DropArea
Specifies the drop target to handle the drag-and-drop upload. By default, the Uploader creates wrapper around file input that will act as drop target.
Declaration
public object DropArea { get; set; }
Property Value
Type |
---|
System.Object |
DropEffect
Specifies the drag operation effect to the Uploader component.
Possible values are.
- Copy
- Move
- Link
- None
Declaration
public DropEffect DropEffect { get; set; }
Property Value
Type |
---|
DropEffect |
Enabled
Specifies a boolean value that indicates whether the Uploader allows the user to interact with it.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
---|
System.Boolean |
EnablePersistence
Enable or disable persisting Uploader state between page reloads. If enabled, the Files
state will be persisted.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableRtl
Enable or disable rendering Uploader in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type |
---|
System.Boolean |
Failure
Triggers when the AJAX request fails on uploading or removing files.
Declaration
public FailureEventArgs Failure { get; set; }
Property Value
Type |
---|
FailureEventArgs |
FileListRendering
Triggers before rendering each file item from the file list in a page. It helps to customize specific file item structure.
Declaration
public EventCallback<object> FileListRendering { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Files
Specifies the list of files that will be preloaded on rendering of Uploader component. The property used to view and remove the uploaded files from server.
By default, the files are configured with uploaded successfully state. The following properties are mandatory to configure the preload files:
- Name
- Size
- Type
Declaration
public List<UploaderUploadedFiles> Files { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<UploaderUploadedFiles> |
HtmlAttributes
You can add the additional html attributes such as styles, class, and more to the root element.
If you configured both property and equivalent html attributes, then the Uploader considers the property value.
Declaration
public object HtmlAttributes { get; set; }
Property Value
Type |
---|
System.Object |
Locale
Specifies the global culture and localization of the Uploader component.
Declaration
public string Locale { get; set; }
Property Value
Type |
---|
System.String |
MaxFileSize
Specifies the maximum allowed file size to be uploaded in bytes. The property used to make sure that you cannot upload too large files.
Declaration
public double MaxFileSize { get; set; }
Property Value
Type |
---|
System.Double |
MinFileSize
Specifies the minimum file size to be uploaded in bytes. The property used to make sure that you cannot upload empty files and small files.
Declaration
public double MinFileSize { get; set; }
Property Value
Type |
---|
System.Double |
Multiple
Specifies a boolean value that indicates whether the multiple files can be browsed or dropped simultaneously in the Uploader component.
Declaration
public bool Multiple { get; set; }
Property Value
Type |
---|
System.Boolean |
Pausing
Fires if pause the chunk file uploading.
Declaration
public EventCallback<object> Pausing { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Progress
Triggers when uploading a file to the server using the AJAX request.
Declaration
public ProgressEventArgs Progress { get; set; }
Property Value
Type |
---|
ProgressEventArgs |
Removing
Triggers on removing the uploaded file. The event used to get confirm before removing the file from server.
Declaration
public EventCallback<object> Removing { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Resuming
Fires if resume the paused chunk file upload.
Declaration
public EventCallback<object> Resuming { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Selected
Triggers after selecting or dropping the files by adding the files in upload queue.
Declaration
public EventCallback<object> Selected { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
SequentialUpload
By default, the file Uploader component is processing the multiple files simultaneously.
If SequentialUpload property is enabled, the file upload component performs the upload one after the other.
Declaration
public bool SequentialUpload { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowFileList
Specifies a boolean value that indicates whether the default file list can be rendered. The property used to prevent default file list and design own template for file list.
Declaration
public bool ShowFileList { get; set; }
Property Value
Type |
---|
System.Boolean |
Success
Triggers when the AJAX request gets success on uploading files or removing files.
Declaration
public SuccessEventArgs Success { get; set; }
Property Value
Type |
---|
SuccessEventArgs |
Template
Specifies the HTML string that used to customize the content of each file in the list.
Declaration
public string Template { get; set; }
Property Value
Type |
---|
System.String |
Uploading
Triggers when the upload process gets started. This event is used to add additional parameter with upload request.
Declaration
public EventCallback<object> Uploading { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |