New to Telerik UI for BlazorStart a free 30-day trial

Configures file upload functionality including server endpoints, file restrictions, and upload events.

Definition

Constructors

C#
public FileManagerUploadSettings()

Methods

C#
public void Dispose()

Implements: IDisposable.Dispose()

C#
protected override void OnInitialized()

Overrides: ComponentBase.OnInitialized()

Properties

Restrict selectable file types by extension (case-insensitive). Provide values with leading dot (e.g., .pdf, .png). Empty or null = allow all. Also validate again on the server for security.

C#
[Parameter]
public List<string> AllowedExtensions { get; set; }

Enforce a maximum file size in bytes. Files larger than this are rejected during OnSelect. Example: MaxFileSize=5242880 limits to 5 MB. Set together with AllowedExtensions for full client-side validation guidance.

C#
[Parameter]
public long? MaxFileSize { get; set; }

Enforce a minimum file size in bytes. Files smaller than this are rejected during OnSelect. Example: MinFileSize=1024 rejects files under 1 KB.

C#
[Parameter]
public long? MinFileSize { get; set; }

Gets or sets a value indicating whether multiple file selection is allowed Default value is false.

C#
[Parameter]
public bool Multiple { get; set; }

Fires when the user cancels an in-progress upload. Use to clean up temporary server state if you manually created placeholders.

C#
[Parameter]
public EventCallback<UploadCancelEventArgs> OnCancel { get; set; }

Fires when an upload or remove operation fails (network / server / validation). Inspect error details and show notifications. Related to OnSuccess for the happy path.

C#
[Parameter]
public EventCallback<UploadErrorEventArgs> OnError { get; set; }

Fires periodically during file transmission. Use to display custom progress indicators (the built-in progress bar already reflects this).

C#
[Parameter]
public EventCallback<UploadProgressEventArgs> OnProgress { get; set; }

Fires before a file removal request is sent. Validate permissions or block deletion by cancelling. Related to OnError for server failures while removing.

C#
[Parameter]
public EventCallback<UploadEventArgs> OnRemove { get; set; }

Fires after files are selected (before upload starts). Validate extension, size or rename files. Combine with AllowedExtensions, MinFileSize and MaxFileSize for consistent UX.

C#
[Parameter]
public EventCallback<UploadSelectEventArgs> OnSelect { get; set; }

Fires after a file successfully uploads. Access server response or update FileManager data source. Typical use: refresh FileManager listing (await FileManagerRef.ProcessDataAsync()) when new files appear.

C#
[Parameter]
public EventCallback<UploadSuccessEventArgs> OnSuccess { get; set; }

Fires just before an upload starts (per file batch). Use to add custom headers, additional form fields or to cancel. Set e.IsCancelled = true (if available) or throw to prevent the upload. Related to OnSelect (file chosen) and OnSuccess (completed).

C#
[Parameter]
public EventCallback<UploadEventArgs> OnUpload { get; set; }

Set the form key that lists file names for deletion requests to RemoveUrl. Default is "files". Usually matches SaveField. Example: RemoveField="attachments".

C#
[Parameter]
public string RemoveField { get; set; }

Set the endpoint that handles deletion of previously uploaded files (HTTP POST/DELETE depending on implementation). The request payload contains file names under RemoveField (default: "files"). Example: RemoveUrl="/api/files/delete".

C#
[Parameter]
public string RemoveUrl { get; set; }

Set the form field name that carries uploaded file(s) to SaveUrl. Default is "files". Change only if your backend expects a different key. Example: SaveField="attachments".

C#
[Parameter]
public string SaveField { get; set; }

Set the endpoint that receives uploaded file content (HTTP POST). Required for server (async) upload. You receive one or more files under the form field specified by SaveField (default: "files"). Example: SaddveUrl="/api/files/upload".

C#
[Parameter]
public string SaveUrl { get; set; }

Send cross-site credentials (cookies, authorization headers) with upload/remove requests when true. Enable only if your API requires authentication and CORS allows credentials. Mirrors the browser withCredentials flag.

C#
[Parameter]
public bool WithCredentials { get; set; }