Class AsyncSettingsModel
Defines the asynchronous settings configuration for the SfUploader component.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class AsyncSettingsModel : Object
Remarks
This class provides configuration options for server-side file operations including upload and removal endpoints, chunk-based upload settings, and retry mechanisms. These settings enable robust file upload functionality with support for large files, network resilience, and server-side processing integration.
Constructors
AsyncSettingsModel()
Declaration
public AsyncSettingsModel()
Properties
ChunkSize
Gets or sets the chunk size used to split large files for sequential upload to the server.
Declaration
public double ChunkSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the chunk size in bytes. The default value is 0 (disabled). |
Remarks
This property specifies the size in bytes for splitting large files into smaller chunks for upload. When a value greater than 0 is specified, the uploader automatically enables chunk-based upload, which improves reliability for large file transfers and allows for resumable uploads. The chunk size should be chosen based on network conditions, server capabilities, and file sizes. Typical values range from 1MB to 10MB for optimal performance.
RemoveUrl
Gets or sets the server endpoint URL for file removal operations.
Declaration
public string RemoveUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing the removal endpoint URL, or an empty string if not configured. |
Remarks
This property specifies the server URL that handles file removal requests. The endpoint must accept POST requests and should define a "RemoveFileNames" attribute to receive information about files to be removed. This property is optional; if not specified, file removal functionality will be disabled. The server endpoint should implement proper validation and security measures for file removal operations.
RetryAfterDelay
Gets or sets the delay time in milliseconds before automatic retry attempts after upload failure.
Declaration
public double RetryAfterDelay { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the delay time in milliseconds. The default value is 500 milliseconds. |
Remarks
This property specifies the waiting period before the uploader attempts to retry a failed upload. The delay helps handle temporary network issues or server unavailability by allowing time for conditions to improve before retrying. A reasonable delay prevents overwhelming the server with rapid retry attempts while ensuring timely recovery from temporary failures.
RetryCount
Gets or sets the maximum number of retry attempts for failed file uploads.
Declaration
public double RetryCount { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the maximum retry count. The default value is 3. |
Remarks
This property specifies how many times the uploader will attempt to retry a failed upload before giving up. Setting an appropriate retry count prevents infinite retry loops while providing sufficient opportunities to recover from temporary failures. The default value of 3 provides a good balance between resilience and preventing excessive server load from repeated failed attempts.
SaveUrl
Gets or sets the server endpoint URL for file upload operations.
Declaration
public string SaveUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing the upload endpoint URL, or an empty string if not configured. |
Remarks
This property specifies the server URL that receives and processes uploaded files. The endpoint must accept POST requests and should define parameters with the same input name used by the component. This property is essential for upload functionality; without it, upload operations cannot be performed. The server endpoint should implement proper file handling, validation, and security measures.