Soenneker.Blazor.FilePond
4.0.3504
Prefix Reserved
dotnet add package Soenneker.Blazor.FilePond --version 4.0.3504
NuGet\Install-Package Soenneker.Blazor.FilePond -Version 4.0.3504
<PackageReference Include="Soenneker.Blazor.FilePond" Version="4.0.3504" />
<PackageVersion Include="Soenneker.Blazor.FilePond" Version="4.0.3504" />
<PackageReference Include="Soenneker.Blazor.FilePond" />
paket add Soenneker.Blazor.FilePond --version 4.0.3504
#r "nuget: Soenneker.Blazor.FilePond, 4.0.3504"
#:package Soenneker.Blazor.FilePond@4.0.3504
#addin nuget:?package=Soenneker.Blazor.FilePond&version=4.0.3504
#tool nuget:?package=Soenneker.Blazor.FilePond&version=4.0.3504
Soenneker.Blazor.FilePond
A Blazor interop library for the file upload library FilePond
This library simplifies the integration of FilePond into Blazor applications, providing access to options, methods, plugins, and events. A demo project showcasing common usages is included.
Diligence was taken to align the Blazor API with JS. Refer to the FilePond documentation for details.
Installation
dotnet add package Soenneker.Blazor.FilePond
Add the following to your Startup.cs file
public void ConfigureServices(IServiceCollection services)
{
services.AddFilePond();
}
⚠ Do not include styles or scripts on the page as they get lazily injected automatically, including most plugins.
Usage
@using Soenneker.Blazor.FilePond
<FilePond @ref="FilePond" Options="_options" OnAddFile="OnAddFile"></FilePond>
@code{
private FilePond? FilePond { get; set; }
private readonly FilePondOptions _options = new()
{
MaxFiles = 20,
AllowMultiple = true,
EnabledPlugins = [FilePondPluginType.ImagePreview]
};
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await FilePond.AddFile("https://picsum.photos/500/500");
}
}
private async Task OnAddFile((FilePondError? error, FilePondFileItem fileItem) obj)
{
Logger.LogInformation("OnAddFile fired: Filename: {fileName}", obj.fileItem.Filename);
Stream? stream = await FilePond!.GetStreamForFile();
// do something with the stream
await stream.DisposeAsync();
}
}
Validation Features
The FilePond component supports validation states with visual feedback and error messages.
Basic Validation
<FilePond @ref="FilePond"
IsValid="@_isValid"
ValidationErrorMessage="@_validationErrorMessage">
</FilePond>
@code {
private bool _isValid = true;
private string? _validationErrorMessage;
private async Task ValidateFiles()
{
var files = await FilePond!.GetFiles();
if (files?.Count == 0)
{
await FilePond.SetValidationState(false, "Please select at least one file.");
}
else
{
await FilePond.SetValidationState(true);
}
}
}
Programmatic Validation Control
// Set validation state
await FilePond.SetValidationState(false, "Custom error message");
// Clear validation state
await FilePond.SetValidationState(true);
File Success States
You can programmatically set files to appear green (success state) within FilePond.
Setting Individual File Success
// Set a specific file as successful by ID
await FilePond.SetFileSuccess(fileId, true);
// Set a specific file as successful by index
await FilePond.SetFileSuccess(0, true);
// Clear success state
await FilePond.SetFileSuccess(fileId, false);
// Set file success when the file is fully processed and ready (recommended)
await FilePond.SetFileSuccessWhenReady(fileId, true);
Setting All Files Success
// Set all files as successful
await FilePond.SetAllFilesSuccess(true);
// Clear all success states
await FilePond.SetAllFilesSuccess(false);
Example: Auto-success on File Upload
private async Task OnAddFile((FilePondError? error, FilePondFileItem fileItem) obj)
{
// Process the file...
// Set the file as successful when it's ready (recommended approach)
await FilePond!.SetFileSuccessWhenReady(obj.fileItem.Id, true);
}
Demo
Check out the demo project for complete examples:
- Basic usage:
/ - Validation & Success features:
/validation-demo
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Blazor.Utils.InteropEventListener (>= 4.0.3838)
- Soenneker.Blazor.Utils.ResourceLoader (>= 4.0.1591)
- Soenneker.Extensions.List (>= 4.0.952)
- Soenneker.Quark.Components.Core.Cancellable (>= 4.0.39)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Blazor.FilePond:
| Package | Downloads |
|---|---|
|
Soenneker.Blazor.SheetMapper
A Blazor component and utility library for mapping uploaded CSV or tabular files to C# objects. Supports header extraction and user-defined property mapping. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.3504 | 82 | 2/12/2026 |
| 4.0.3503 | 84 | 2/12/2026 |
| 4.0.3502 | 82 | 2/12/2026 |
| 4.0.3501 | 83 | 2/12/2026 |
| 4.0.3500 | 74 | 2/12/2026 |
| 4.0.3499 | 79 | 2/11/2026 |
| 4.0.3498 | 115 | 2/11/2026 |
| 4.0.3497 | 81 | 2/11/2026 |
| 4.0.3496 | 82 | 2/11/2026 |
| 4.0.3495 | 77 | 2/11/2026 |
| 4.0.3494 | 109 | 2/10/2026 |
| 4.0.3493 | 92 | 2/10/2026 |
| 4.0.3492 | 144 | 2/10/2026 |
| 4.0.3491 | 115 | 2/6/2026 |
| 4.0.3490 | 88 | 2/6/2026 |
| 4.0.3489 | 115 | 2/4/2026 |
| 4.0.3488 | 110 | 2/4/2026 |
| 4.0.3487 | 118 | 2/2/2026 |
| 4.0.3486 | 132 | 1/29/2026 |
| 4.0.3485 | 97 | 1/29/2026 |