File Upload
A drag-and-drop file upload area with per-file progress tracking, validation, cancel, and retry.
Installation
dotnet add package Lumeo
One-time app setup (AddLumeo(), CSS & JS) is covered in the
installation guide.
Usage
@using Lumeo <FileUpload />
When to Use
- File attachments in forms such as resumes, invoices, or supporting documents
- Image uploads for profile pictures, product photos, or galleries
- Document submissions with drag-and-drop zones for a better user experience
- Bulk file uploads with per-file progress indicators, cancel, and retry
Switch between Dropzone, Button, and Avatar to see the upload surface change.
API Reference
FileUpload
FileUpload — Public Methods
| Method | Returns | Description |
|---|---|---|
| Reset() | Task | Clears internal file selection and upload state. Cancels any in-flight uploads. Remounts the native file input so the same file can be re-picked without a DOM workaround. Does not fire any events. |
| StartUploadAsync() | Task | Starts uploads for all pending items when AutoUpload=false. |
FileUploadItem
Represents the state of each file in the upload queue. Passed to OnUpload, OnFileUploaded, OnFileFailed, etc.
| Property | Type | Description |
|---|---|---|
| Id | string | Unique identifier (Guid hex) for this upload item. |
| File | IBrowserFile | The underlying browser file reference. |
| Name | string | File name. |
| Size | long | File size in bytes. |
| Status | FileUploadStatus | Current status: Pending, Uploading, Succeeded, Failed, Cancelled. |
| ProgressPercent | int | Upload progress 0–100, updated via IProgress. |
| ErrorMessage | string? | Error message if Status is Failed. |
| Url | string? | Server-returned URL or id after a successful upload. |
| ChunkSize | long | Chunk-size hint from the ChunkSize parameter (0 if not set). |